Object reference error when trying to view pages

Posted by Community Admin on 04-Aug-2018 19:42

Object reference error when trying to view pages

All Replies

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

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?

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

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

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

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

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

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

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

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

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

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?

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

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

Posted by Community Admin on 15-Dec-2011 00:00

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.

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

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

This thread is closed