1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Can't edit pages

Can't edit pages

10 posts, 0 answered
  1. Vitaly
    Vitaly avatar
    13 posts
    Registered:
    04 Mar 2009
    04 Jan 2011
    Link to this post
    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              

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    04 Jan 2011
    Link to this post
    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
  3. Vitaly
    Vitaly avatar
    13 posts
    Registered:
    04 Mar 2009
    04 Jan 2011
    Link to this post
    Hello Ivan,

    Thank you for your help. I've used Build 4.0.992.0 to upgrade. 
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    07 Jan 2011
    Link to this post
    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
  5. Valerie
    Valerie avatar
    19 posts
    Registered:
    24 Mar 2010
    18 Apr 2011
    Link to this post
    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)
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    26 Apr 2011
    Link to this post
    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

  7. Valerie
    Valerie avatar
    19 posts
    Registered:
    24 Mar 2010
    26 Apr 2011
    Link to this post
    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
  8. Valerie
    Valerie avatar
    19 posts
    Registered:
    24 Mar 2010
    26 Apr 2011
    Link to this post
    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.
  9. Phil
    Phil avatar
    89 posts
    Registered:
    19 Oct 2010
    26 Apr 2011
    Link to this post
    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?   
  10. Alon Rotem
    Alon Rotem avatar
    26 posts
    Registered:
    29 Feb 2016
    03 May 2011
    Link to this post
    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
10 posts, 0 answered