Can't edit pages

Posted by Community Admin on 04-Aug-2018 12:12

Can't edit pages

All Replies

Posted by Community Admin on 04-Jan-2011 00:00

Hello,

I have following exception after upgrade to RC from Beta2. I can't open any page to edit from back office. 

Server Error in '/' Application.

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:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Sitefinity.Modules.Pages.DraftProxyBase.GetPageUrlByNodeId(String nodeId) +110
   Telerik.Sitefinity.Modules.Pages.DraftProxyBase.get_CancelUrl() +469
   Telerik.Sitefinity.Modules.Pages.DraftProxyBase.CreateChildControls(Page page) +1281
   Telerik.Sitefinity.Modules.Pages.PageDraftProxy.CreateChildControls(Page page) +42
   Telerik.Sitefinity.Web.PageEditorRouteHandler.ApplyLayoutsAndControls(Page page, RequestContext requestContext) +350
   Telerik.Sitefinity.Web.RouteHandler.InitializeContent(Page handler, RequestContext requestContext) +333
   Telerik.Sitefinity.Web.RouteHandler.Handler_Load(Object sender, EventArgs e) +561
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1              

Posted by Community Admin on 04-Jan-2011 00:00

Hello Vitaly,

Could you check the version you used to upgrade your project? If you have used build 4.0.1030.0 to upgrade your project this is not supported upgrade path.

Regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about 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 04-Jan-2011 00:00

Hello Ivan,

Thank you for your help. I've used Build 4.0.992.0 to upgrade. 

Posted by Community Admin on 07-Jan-2011 00:00

Hello Vitaly,

Thank you for the additional information.

Can you please check if all of the pages are using the same page template? Also do you get this exception for newly created pages?

Greetings,
Radoslav Georgiev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about 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 18-Apr-2011 00:00

I am also getting this error on a brand new build 1210 database when users of certain roles attempt to edit a page.  Please help!!!

The page template is a custom masterpage.  The roles permitted to edit the page are custom.  Administrators can edit the page no problem.

System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Sitefinity.Modules.Pages.DraftProxyBase.get_CancelUrl()
   at Telerik.Sitefinity.Modules.Pages.DraftProxyBase.CreateChildControls(Page page)
   at Telerik.Sitefinity.Modules.Pages.PageDraftProxy.CreateChildControls(Page page)
   at Telerik.Sitefinity.Web.PageEditorRouteHandler.ApplyLayoutsAndControls(Page page, RequestContext requestContext)
   at Telerik.Sitefinity.Web.RouteHandler.InitializeContent(Page handler, RequestContext requestContext)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Posted by Community Admin on 26-Apr-2011 00:00

Hi Valerie,

What are the permissions to edit the template and to see the place holders for the custom role?

Best wishes,
Radoslav Georgiev
the Telerik team


Posted by Community Admin on 26-Apr-2011 00:00

Radoslav,

The permissions to edit the template were set to "Designers" (a role we do not use).  I changed it to "All Backend Users" (a role which all of my custom role users also have) and still see the same result.

I'm not sure I understand the second half of your question:  "...and to see the place holders for the custom role?"

-Valerie

Posted by Community Admin on 26-Apr-2011 00:00

Additional notes:

I have also tried giving my users, who are assigned to a custom role and are backend users, permissions to edit a page that uses a standard SF template.  They receive the same Sitefinity internal exception when trying to edit a page.

I have also tried upgrading to 4.1.1339.  Same exception.

Posted by Community Admin on 26-Apr-2011 00:00

Hi.  I work w Valerie and we have this update:
We found a sort of work around.  If we put our user in the SF Authors role they can edit the page w o error.
We never had to do this before version 4.1

Before ver 4.1 we had been giving the users role permissions programatically with code like the following, and everything worked fine.

thePermission.GrantActions(true, SecurityConstants.Sets.Pages.Modify);
thePermission.GrantActions(true, SecurityConstants.Sets.Pages.EditContent);
thePermission.GrantActions(true, SecurityConstants.Sets.Pages.Create);
thePermission.GrantActions(true, SecurityConstants.Sets.Pages.CreateChildControls);
thePermission.GrantActions(true, SecurityConstants.Sets.Pages.View);
thePermission.GrantActions(true, SecurityConstants.Sets.Pages.Delete);


So we found a bug in ver 4.1 right?   

Posted by Community Admin on 03-May-2011 00:00

Hello Phil,

I tried to reproduce your problem, but to no avail. Both with our latest code version and with the build you specified, 4.1.1339.0.

Here's a detailed list of the steps I took:
I created a custom page template in the system, based on a custom master page.
I created a custom page (named "CustomPage") based on the custom template.
I created a custom role (named "PageEditor") in the system, and a user ("testUser") who is assigned to this custom role (and defined as a backend user).
In order to grant PageEditor role specific permissions on CustomPage, I ran the following code:

01.void AddPermissionsToCustomPage()
02.
03.   PageManager pm = PageManager.GetManager();
04.   RoleManager rm = RoleManager.GetManager();
05.    
06.   //get the custom page
07.   PageNode customPage = pm.GetPageNodes()
08.     .Where(
09.       node => node.Title == "CustomPage")
10.       .FirstOrDefault();
11.    
12.   //get the custom role
13.   Role pageEditor = rm.GetRole("PageEditor");
14.    
15.   if (customPage != null)
16.   
17.      //make sure permission inheritance for this page
18.      //is broken. Otherwise specific permissions are
19.      //not effective.
20.      pm.BreakPermiossionsInheritance(customPage);
21.       
22.      //check if a permission for the custom role already
23.      //exists for this page
24.      Permission pageEditorPermission =
25.        customPage.GetActivePermissions()
26.        .Where(permission =>
27.          permission.PrincipalId == pageEditor.Id)
28.        .FirstOrDefault();
29.       
30.      //if the permission doesn't exist,
31.      //we need to created it and attach it to the page
32.      if (pageEditorPermission == null)
33.      
34.         pageEditorPermission = pm
35.           .CreatePermission(
36.              SecurityConstants.Sets.Pages.SetName,
37.              customPage.Id,
38.              pageEditor.Id);
39.          
40.         customPage.Permissions.Add(
41.            pageEditorPermission);
42.      
43.      //grant the custom role the option to modify
44.      //(or any other desired permission)
45.      pageEditorPermission.GrantActions(true,
46.        SecurityConstants.Sets.Pages.EditContent);
47.       
48.      //Done.
49.      pm.SaveChanges();
50.   
51.
Once this code ran, I could verify in the backend UI that my custom role has the correct permissions granted, and editing the page went without crashes while logged in as testUser.

Please let me know if this information was helpful for you. If you still get the errors you reported, please specify in more detail what steps you've taken, the code you've been trying to run in order to grant/deny permissions and the status of permissions on the aforementioned objects.
Thanks.

Kind regards,
Alon Rotem
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 18-Oct-2017 00:00

The specified role "Administrators" already exists.
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.Configuration.Provider.ProviderException: The specified role "Administrators" already exists.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:

[ProviderException: The specified role "Administrators" already exists.] Telerik.Sitefinity.Security.Data.OpenAccessRoleProvider.CreateRole(Guid id, String roleName) +447 Telerik.Sitefinity.Web.UI.Backend.AdministratorPane.EnsureRole(RoleDataProvider roles, RoleInfo role) +379 Telerik.Sitefinity.Web.UI.Backend.AdministratorPane.DoWork() +95 Telerik.Sitefinity.Web.UI.Backend.StartupWizard.ProcessWizardStep(InternalWizard wizard, Int32 stepIndex, IStartupWizardStepPane& currentPane) +89 Telerik.Sitefinity.Web.UI.Backend.StartupWizard.wizard_FinishButtonClick(Object sender, InternalWizardNavigationEventArgs e) +84 Telerik.Sitefinity.Web.UI.Backend.InternalWizard.OnFinishButtonClick(InternalWizardNavigationEventArgs e) +92 Telerik.Sitefinity.Web.UI.Backend.InternalWizard.OnBubbleEvent(Object source, EventArgs e) +512 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +121 System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +161 System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9997462 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1738

 

I created  earlier 1 project i forgot password and everything. So i tried to create new one getting error, could you please let me know that how and what i want to do. it's very urgent work me live.

This thread is closed