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.
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.
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.
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.
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 https://github.com/KevinJump/LocalGovStarterKit/blob/v6-main/Src/Jumoo.StarterKit.Installer/ContentImporter.cs
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! :-)
is working on a reply...