Change document property alias and now it is throwing an error
Hi,
I change one of my document property alias from imageGallery to gallery to make it consistent with the other document type. After changing it, my usercontrol that tries to access it is now throwin a runtime error "object not set to reference". It seems that it can't find the gallery property.
I already tried republishing the site but nothing happens. I'm using this code to access the gallery property.
Sometimes it is neccessary to republish your site (or sections of it) to ensure that the updated property is propograted across all content. The best way to do this is to right-click your Home page node in the Content tree and select "Publish" and remember to tick the box saying "Publish Home and all its subpages". If your change only effects a section of your site (such as all child-pages of a Gallery page) then you can just republish that section.
Change document property alias and now it is throwing an error
Hi,
I change one of my document property alias from imageGallery to gallery to make it consistent with the other document type. After changing it, my usercontrol that tries to access it is now throwin a runtime error "object not set to reference". It seems that it can't find the gallery property.
I already tried republishing the site but nothing happens. I'm using this code to access the gallery property.
try touching your web.config so that the site rebuilds see if that fixes the issue.
I did that and still encounter the same error.
Object reference not set to an instance of an object.
Hi Sherry,
Sometimes it is neccessary to republish your site (or sections of it) to ensure that the updated property is propograted across all content. The best way to do this is to right-click your Home page node in the Content tree and select "Publish" and remember to tick the box saying "Publish Home and all its subpages". If your change only effects a section of your site (such as all child-pages of a Gallery page) then you can just republish that section.
I also tried that but still the error is persistent. :(
Maybe a small tip to dump the object in xslt by doing something like:
<xsl:copy-of select="$currentNode"/>
Then you can see or the data is correct.
is working on a reply...