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

Forums / Bugs & Issues / Object reference error when trying to view pages

Object reference error when trying to view pages

9 posts, 0 answered
  1. Nathan
    Nathan avatar
    9 posts
    Registered:
    04 Mar 2011
    19 May 2011
    Link to this post
    I upgraded a site today from Sitefinity 4.1 to 4.1 SP1.  However, now when I try to view any page (on the front-end of the site), I get an object reference error.  I can edit all of the pages and templates fine in the back-end.

    Anyone else having this issue?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    19 May 2011
    Link to this post
    Hi Nathan,

    Have you deleted some of the templates ? The error is thrown indicates for some missing relations - one of the objects in the methods used by SitefinityPageResolver is null. SitefinityPageResolver is used exactly when you try to view a page. The problem could be related to some of the controls in your templates, since the issue occurs on all/many pages.

    Greetings,
    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. Nathan
    Nathan avatar
    9 posts
    Registered:
    04 Mar 2011
    19 May 2011
    Link to this post
    Hi Ivan,

    Thanks for the quick response.  I don't believe any templates have been removed, however, I do agree that it seems to be a problem with our master page template.  There is a custom widget that we use (an image slider) and it appears to be missing.  Could this be causing the reference error?  Other than that, there is a login control, search, navigation and a few content blocks.  They all display fine in the back-end though.

    Thanks,
    Nathan
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    20 May 2011
    Link to this post
    Hi Nathan,

    If you remove the controls from the template and add them again does this fix the issue. Are there issues creating a new page and adding some controls on it? It is possible that something went wrong during the upgrade and the old pages are only affected. I saw that you have opened a support ticket. It would be easily if you can provide FTP account or live link from where we can get the project and its database and debug it locally, so we can see the null object that is passed.

    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
  5. Nathan
    Nathan avatar
    9 posts
    Registered:
    04 Mar 2011
    20 May 2011
    Link to this post
    Hi Ivan,

    It seems like it occurs with any page that is using the master template.  Even creating new pages (using that template) will throw the same error.  The weird thing is I can edit all of the pages and preview them just fine.

    I will try removing all of the controls this morning and let you know how that goes.

    Nathan
  6. Nathan
    Nathan avatar
    9 posts
    Registered:
    04 Mar 2011
    20 May 2011
    Link to this post
    Update:

    It looks like if I remove every control in the template, I can get past the error.  So, I guess I will need to remove all of the controls and re-add them on the actual site for it to get back to "normal".

    Any ideas on why this was causing an error?
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    25 May 2011
    Link to this post
    Hello Nathan,

    I cannot tell you what exactly causes the issue. The main reasons for this error are - nested templates or some  custom code - for instance you use a custom user control put a public properties and some of the properties are deleted which might result in an issue if you used objects based on this properties. 

    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
  8. Ken Sykora
    Ken Sykora avatar
    2 posts
    Registered:
    19 Aug 2009
    15 Dec 2011
    Link to this post
    Hi Ivan:

    What is the workaround for when the cause of this issue is nested Master pages? We are using nested masters on this site and I'm running into the same issue as described above.
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    16 Dec 2011
    Link to this post
    Hi Ken,

    Check if the template is not based on itself. If this is the case you have to recreate it.

    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
9 posts, 0 answered