New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move ISlugService to OrchardCore.Autoroute.Core #11491
Conversation
Ok, this breaks because the ISlugService is not registered before doing AddAntiForgery(). Also, probably need to be registered like the ShellSettings are. |
I quote from the title
I think |
That's what I did in the next commit. There is still an issue with registering the service at the right place. I tried some places without success. Will take a second look later. |
Yes we are in a So would need to be an app level singleton registered for example in our |
I tried in the |
Fix Slugify class methods
Thanks @jtkech it works now as a singleton. I tested the Liquid filter on a Liquid page and it works so far. |
Removing the "breaking change" label. It will only break modules that were using the SlugService in the OrchardCore.Liquid module. Marked the class as obsolete for now. |
I would have just created a new static component helper in |
Ok, now the SlugService is registered only as an Application level singleton and it works for all OC modules. Removed the OrchardCore.Autoroute.Abstraction project. Moved the ISlugService to OrchardCore.Abstractions. I think it makes sense that we register this as an Application level singleton. It doesn't need to be a scoped service like it was before. |
src/OrchardCore.Modules/OrchardCore.Liquid/Services/SlugService.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.Abstractions/Modules/Services/ISlugService.cs
Outdated
Show resolved
Hide resolved
Okay waiting on @sebastienros approval on this one. |
I am ok to look at the PR but not with the intent of fixing the linked issue, it's not the correct solution IMO. |
Conflicts to solve. |
Resolve the conflict |
# Conflicts: # OrchardCore.sln # src/OrchardCore/OrchardCore.Queries.Abstractions/LuceneQueryResults.cs
2 approvals. I'm leaving someone else to merge this one. I fixed the remaining conflicts. |
Oops, don't merge yet. Unit tests failing, that's a new one. |
Done. |
Fixed build again. |
Introduces new assembly OrchardCore.Autoroute.Core.
I moved some code into this assembly to clean up the OrchardCore.Autoroute module.
SlugService is now registered as an application-level singleton and it is moved to the OrchardCore assembly directly along with the LocalClock service for example.