More in this section

Forums / Bugs & Issues / Changing sitefinity backend root node name from Sitefinity to admin

Changing sitefinity backend root node name from Sitefinity to admin

8 posts, 0 answered
  1. Mayvelous
    Mayvelous avatar
    43 posts
    Registered:
    26 May 2011
    11 Aug 2011
    Link to this post
    Hi,

    I've changed the Sitefinity Backend pages root node name from "Sitefinity" to "admin" with the idea of trying to access the login or admin pages using http://localhost:60876/admin etc structure.

    But I'm getting the following once I try the /admin link:

    The resource cannot be found.

    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

    Requested URL: /admin/


    I can access the normal admin pages if I browse to http://localhost:60876/Sitefinity.

    The problem is, I can no longer access Administration > Backend Pages (http://localhost:60876/admin/Administration/BackendPages) anymore and getting the above 404 error.
    I cannot change the link back to Sitefinity either ie. http://localhost:60876/Sitefinity/Administration/BackendPages

    Update: I can only access Dashboard page and none other admin pages.

    Can you tell me how I can revert it back to the way it was please.

    Thanks.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    11 Aug 2011
    Link to this post
    Hello May,

    You can change the name programmatically. Please take a look at Modifying Page Properties


    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Mayvelous
    Mayvelous avatar
    43 posts
    Registered:
    26 May 2011
    11 Aug 2011
    Link to this post
    Could you explain more where to place the function please?
    I've changed the "Backend Page" node and not the custom created pages. Please see attached image.

    Now I cannot access any of the admin pages except the dashboard.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    11 Aug 2011
    Link to this post
    Hello May,

    You can run the code from a simple aspx page added to the root of the website.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Mayvelous
    Mayvelous avatar
    43 posts
    Registered:
    26 May 2011
    12 Aug 2011
    Link to this post
    I've added .aspx page in the project root and the following in the page load event

    App.WorkWith()
    .Pages()
    .Where(p => p.Page.HtmlTitle == "admin")
    .Where(p => p.Page.Status == ContentLifecycleStatus.Live)
    .ForEach(p =>
    {
    p.Page.Title = "Sitefinity";
    p.Page.HtmlTitle = "Sitefinity";
    })
    SaveChanges();

    I'm getting this error:

    Object reference not set to an instance of an object.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error: 

    Line 34:             App.WorkWith()
    Line 35:                    .Pages()
    Line 36:                    .Where(p => p.Page.HtmlTitle == "admin")
    Line 37:                    .Where(p => p.Page.Status == ContentLifecycleStatus.Live)
    Line 38:                    .ForEach(p =>

    Source File: D:\Products\Atwww.Sitefinity\Trunk\Atwww.Sitefinity.Web\ChangePageName.aspx.cs    Line: 36


    I tried binding all the pages to the repeater too but got the same error.
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    12 Aug 2011
    Link to this post
    Hi May,

    The "p" object is null. The HtmlTile is not null. You get all pages with Pages(), so you can see the actual title from the returned items.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Mayvelous
    Mayvelous avatar
    43 posts
    Registered:
    26 May 2011
    16 Aug 2011
    Link to this post
    Yes, I've tried that, listing all the pages to see the titles but those pages does not include all the backend pages.
    I cannot find "Sitefinity" or "admin" in the list at all.
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    16 Aug 2011
    Link to this post
    Hi May,

    App.WorkWith().Pages() includes all pages. If you want to get only the backend or frontend you can use

    • App.WorkWith().Pages().LocatedIn(Telerik.Sitefinity.Fluent.Pages.PageLocation.Backend)
    • App.WorkWith().Pages().LocatedIn(Telerik.Sitefinity.Fluent.Pages.PageLocation.Frontend)

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
8 posts, 0 answered