Copied to clipboard

Flag this post as spam?

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

  • johncena123 2 posts 72 karma points
    Sep 14, 2017 @ 03:19

    Need NodeID's to be the same on both dev site and live site...


    I am in a giant time crunch to get a site up and running and I'm having a bit of a problem.

    I have a macro that finds a node by its ID and loops through its children. When I deployed the site to live I noticed that all my content node ID's are different on the live site, rendered my code useless.

    Obviously I'd like to find a better way to write this piece of code, but it's taking me too long to figure out and I really need a quick fix. Is there any way to ensure that the content node ID's on your live site match the ID's on your dev site?

    Thanks in advance!

  • Paul Stephenson 19 posts 129 karma points
    Sep 14, 2017 @ 06:55
    Paul Stephenson


    As you've spotted, it's best not to rely on node IDs in macros for exactly this reason.

    Do you have the option to back up your development Umbraco database and restore it to the live site? If your development site is in a perfect state (no test content or anything) then this will be the easiest option.

    If there is a content mismatch between dev and live at the moment, you may be able to copy live to dev, re-apply your new changes, and then copy it back from dev to live.

    Otherwise I'm afraid you are really back to changing your macros to lose the node IDs, or hacking up SQL scripts or .NET utilities that will likely take longer to get right. (Unless anyone else knows a better way!)

    Good luck!


Please Sign in or register to post replies

Write your reply to: