Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sherry Ann Hernandez 320 posts 344 karma points
    Jun 21, 2011 @ 10:56
    Sherry Ann Hernandez
    0

    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.

    node.GetProperty("gallery").Value

     

     

     

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jun 21, 2011 @ 11:54
    Ismail Mayat
    0

    try touching your web.config so that the site rebuilds see if that fixes the issue.

  • Sherry Ann Hernandez 320 posts 344 karma points
    Jun 21, 2011 @ 12:58
    Sherry Ann Hernandez
    0

    I did that and still encounter the same error.

    Object reference not set to an instance of an object.

     

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Jun 21, 2011 @ 13:22
    Dan Diplo
    1

    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.

  • Sherry Ann Hernandez 320 posts 344 karma points
    Jun 21, 2011 @ 13:32
    Sherry Ann Hernandez
    0

    I also tried that but still the error is persistent. :(

  • Sjors Pals 617 posts 270 karma points
    Jun 21, 2011 @ 14:12
    Sjors Pals
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft