Copied to clipboard

Flag this post as spam?

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

  • Mikkel.S 4 posts 94 karma points
    Dec 13, 2019 @ 10:08

    Is Umbraco Packages capable of overwriting content?

    Hey all,

    As part of a solution setup, we have several environments with different content - And I want to grab some content from one environment, and parse it to another. Hence using the Umbraco Packages to "move" content.

    Currently, I can grab a specific node-folder or even a specific node, but if it already exists, nothing changes. If I delete that specific node, I get a DB error stating the "UniqueUmbracoId" already exists, and I would love to NOT alter directly in the db. Which brings me to my question:

    Is it possible to create a package action that checks for nodes with the same Id, name or something else, and if it exists, overwrite said content with whatever is in the package?

    Thank you very much in advance, and I hope it makes sense. /Mikkel.

  • Kevin Jump 1768 posts 11344 karma points MVP 4x c-trib
    Dec 13, 2019 @ 10:44
    Kevin Jump

    Hi Mikkel,

    Umbraco Packages are specifically designed to be additive, that is they only add new items/properties :( so yes out the box you can't write over things

    but you could use a package action, as you can do anything with them

    I would suggest you take a look at using usync even if you then put it in a package action as it will handle the actual overwriting for you.

    it's not a package action but this is how the localgov starter kit does it using a xml file and usync core (so not the whole uSync) to import content

  • Mikkel.S 4 posts 94 karma points
    Dec 20, 2019 @ 12:39

    Hey Kevin,

    Thanks for the reply, and sorry for the slow response.

    It would be such a great addition to the packages, if they had a functionality such as Sitecore, in which you can choose to overwrite content, if it exists.

    But thanks for the answer!

    Merry Christmas & a happy new year! :-)

Please Sign in or register to post replies

Write your reply to: