Copied to clipboard

Flag this post as spam?

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


  • Rik Hodiamont 56 posts 156 karma points
    May 29, 2015 @ 12:51
    Rik Hodiamont
    0

    node id's change after transfer

    Hi,

    I just figured out that the node ID's change when transferring the site from the production to staging envoirment. The problem with this is dat a lot of XSLT files use the GetXMLbyNodeID function. When the ID's changes the XSLT isn't working. Is there a way to correct this? 

    I readed that Courier corrects the ID's automaticly, but becease XSLT won't be transferred automaticly the ID's in the XSLT stay the same.

    Has anyone have the same problem? And maybe a solution?

    Kind regards,

    Rik 

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    May 29, 2015 @ 12:59
    Dave Woestenborghs
    101

    Hi Rik,

    What courier does is extract your content from environment A and deploys it to environment B.

    As content uses a incrimental integer in the database this can be different for a number of reasons.

    • New content has been added to environment B since the last deployment from environment A
    • Content deployed by Courier will not be created on environment B as on environment A
    Because of this using id's in your rendering logic is a bad practice. Most of the times you use a id it can also be fixed with a xpath statement.
    Dave
  • Rik Hodiamont 56 posts 156 karma points
    May 29, 2015 @ 13:04
    Rik Hodiamont
    0

    Hi Dave, 

    Thanks for your quick response. 

    I will try to change the GetXmlNodeById function by normal xpath statements.

    Kind regards,

    Rik

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    May 29, 2015 @ 13:06
    Dave Woestenborghs
    0

    If you don't get it to work with xpath I recommend storing your id's as appsettings in the web.config.

    That way you can easily change it without having different xslt files for each environment that you deploy too.

    Dave

  • Urs Marian 1 post 71 karma points
    May 27, 2020 @ 22:30
    Urs Marian
    0

    It is possible to have a way when we deploy by Umbraco Courier between 2 environments to have the same id's for files img, svg and pdf for maintains the same path for them?

Please Sign in or register to post replies

Write your reply to:

Draft