Changing sitefinity backend root node name from Sitefinity t

Posted by Community Admin on 04-Aug-2018 03:18

Changing sitefinity backend root node name from Sitefinity to admin

All Replies

Posted by Community Admin on 11-Aug-2011 00:00

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 localhost:60876/Sitefinity.

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

Posted by Community Admin on 11-Aug-2011 00:00

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

Posted by Community Admin on 11-Aug-2011 00:00

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.

Posted by Community Admin on 11-Aug-2011 00:00

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

Posted by Community Admin on 12-Aug-2011 00:00

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.

Posted by Community Admin on 12-Aug-2011 00:00

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

Posted by Community Admin on 16-Aug-2011 00:00

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.

Posted by Community Admin on 16-Aug-2011 00:00

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

This thread is closed