Try our conversational search powered by Generative AI!

404 error when trying to set access rights on a Page

Vote:
 

Hi there,

I'm facing a problem when trying to define access rights for any page in EPiServer. In the CMS administration, when I access Admin->Admin tab->Set access rights and click on any page on the tree, I get a 404 error, making me unable to define permissions for pages.

Also, going through the CMS Edit and edit the permissions from there doesn't work. When I press the button "Manage" from the property "Visible to", no matter what changes I do, the Save button is always unavailable.

What may be the issue here? What can I do to solve this problem?

Thank you and kind regards,

David

#86465
May 22, 2014 10:07
Vote:
 

There is a bug reported that registration of ClassicLinkRoute route (that is a special route that handles "classic" links like '/templates/page.aspxx?id=77') will brake Set access rights.

#86545
May 23, 2014 11:55
Vote:
 

Thank you for your answer, Johan. What workaround can I apply to solve this problem?

#86548
May 23, 2014 12:40
Vote:
 

Are there any alternatives/recommendations for installations wishing to keep their classic templates/page.aspx/?id=1234 functionality working without having to use the ClassicLinkRoute route? Or, do we need to create an HttpModule or Handler for intercepting requests before they are handled by EPiServer?

#86675
Edited, May 28, 2014 11:10
Vote:
 

What you probably could do is to create your own class that inherits ClassicLinkRoute and then override GetRouteData as:

  public override RouteData GetRouteData(System.Web.HttpContextBase httpContext)
        {
           if (!httpContext.Request.Url.Path.StartsWith(EPiServer.Shell.Paths.ToResource("CMS", null)))
           {
               return base.GetRouteData(httpContext);
           }

           return null;
        }



and then register your own route instead of ClassicLinkRoute

#86680
May 28, 2014 11:22
Vote:
 

I just implemented this. And it works like intended. 

I am now able to edit the "Set Access Rights" panel in Admin.

#86685
Edited, May 28, 2014 12:54
Vote:
 

Still having trouble with the ClassicLinkRoute.

Even if I inherit the class, and in the GetRouteData method just returns null without any other code, some links in admin mode gets corrupted.

With the inherited class registered;

Dashboard url; http://site/?action=Index&controller=Dashboard&moduleArea=Shell

Addons url; http://site/?action=Index&controller=AddOns&moduleArea=EPiServer.Packaging.UI

Without adding the ClassicLinkRoute in registerRoutes;

Dashboard url; http://site/login

Addons url; http://site/login/AddOns

So, just by adding a class inherited by ClassicLinkRoute and returning null directly in GetRouteData will corrupt some admin urls. Other urls might be broken as well, I havnen't checked every corner of admin yet...

I hope EPiServer got some attention on this one, as it will be a major rewrite to workaround this at the moment. Is it possible for developers to get an insight into the bug registration site?

Any other ideas for us to try out?

#86775
May 30, 2014 13:39
Vote:
 

Try override GetVirtualPath as well as:

public override VirtualPathData GetVirtualPath(RequestContext requestContext, RouteValueDictionary values)
        {
            return null;
        }

#86776
May 30, 2014 13:43
Vote:
 

Thanks, didn't try that yet! 

That did the trick, returning null kept the provider out of the loop.

Now, I am implementing the same rules in GetVirtualPath method, and first try looks promising.

Thanks for the help! When I have tested the code, I can post a reply with the implementation.

#86777
May 30, 2014 14:02
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.