Upgrades Questions on upgrading to version 7.x.
Version 7.x > Upgrades > Null References After Compiling Kentico 7 View modes: 
User avatar
Member
Member
gabriel.vera-haskell - 3/4/2013 11:55:45 AM
   
Null References After Compiling Kentico 7
Kentico Support.

At this time we were able to upgrade to Kentico 7 by changing code files to reference the correct namespaces and new properties (i.e. NodeID to DocumentID). I compiled the application and compilation succeeded.

However, when trying to pull the site we keep getting null reference exception on PageInfo variables and TreeNode variables.

Example:
CMS.DocumentEngine.PageInfo currentPage = CMSContext.CurrentPageInfo;

CMS.DocumentEngine.TreeNode currentPage = CMSContext.CurrentDocument

Attached is an example image of the error (the null object is currentPage property):

oops...could not attach image...

User avatar
Kentico Support
Kentico Support
kentico_radekm - 3/4/2013 10:17:56 PM
   
RE:Null References After Compiling Kentico 7
Hello.

What files this errors appear in? Could you please send me names and location of those files in the web project or complete screenshots containing path to those files? Thank you.

Best Regards,
Radek Macalik