Closed Dandroid5000 closed 1 year ago
Hi, has anyone had a chance to look at this? Thanks in advance
Can anyone please help with this? Note, we have just been alerted that the same issue is present in the GETA Optimizely Sitemaps package.
@Dandroid5000 What areas/routing configuration do you have? Has it been changed after upgrading from EPiServer.CMS.Core 12.9.2 to 12.14.0?
We use default ASP.NET routing and if it worked before, it should work now too unless there were changes in your project or in EPiServer.CMS.Core. Renaming the file is a workaround and not a proper fix.
@Dandroid5000 In what way does the above fix your problem with routing?
Could it be that your project registers a custom IViewLocationExpander
that picks up the start page view instead of respecting the GetaNotFoundHandlerAdmin
area somehow?
I tried reproducing this using Optimizely 12.9.0 and 12.14.0, single and multi-site configuration. Everything seemed to work correctly.
Hi @marisks , thanks so much for getting back to me. We are using attribute-based routing. This is a multi-site setup wherein each site is defined within an MVC area. Each page controller within each area uses a base controller that specifies the route and the area (see below).
Nothing has changed with respect to routing in our project since upgrading from EPiServer.CMS.Core 12.9.2 to 12.14.0, nothing that myself or my teammates have been able to determine anyway.
@svenrog The only configuration change we have for custom View Locations is per below
^ this link is resolving to our HomepageController and hitting its Index.cshtml... this was not happening before.
I found another workaround following this: https://stackoverflow.com/questions/50815280/razor-pages-form-page-handler-not-working-with-get-method ^ i.e. adding the route ("{handler?}") to the @page declaration in \Geta.NotFoundHandler.Admin\Areas\GetaNotFoundHandlerAdmin\Pages\Index.cshtml
^ this also fixes the issue in our testing so far
@Dandroid5000 Does adding asp-area="GetaNotFoundHandlerAdmin"
to the taghelpers with links work too?
Hi @svenrog. Yes! That seems to work too :D
Hi @svenrog , hi @marisks
Thanks so much for the code fix! I look forward to testing it out when it hits the nuget feed!
Regarding the same issue in your sitemaps plugin (https://github.com/Geta/geta-optimizely-sitemaps), would you like me to raise an issue over on that repo too?
Yes, please do register there as well (it will help us to keep track of issues resolved in next version).
Thx!
The new package is published.
We have recently updated Optimizely packages EPiServer.CMS.Core 12.9.2 to 12.14.0 and are now getting a route conflict between our start page path ("/") and the path to add/delete a redirect "getanotfoundhandleradmin/?handler=create".
Currently we are unable to add or delete a redirect because the request is returning a 405.
Could you please rename following files to something more targeted? Geta.NotFoundHandler.Admin/Areas/GetaNotFoundHandlerAdmin/Pages/Index.cshtml Geta.NotFoundHandler.Admin/Areas/GetaNotFoundHandlerAdmin/Pages/Index.cshtml.cs
We were able to resolve this in our testing with the following changes
Thanks in advance