0

How can I tell Unicorn to sync the root item: "Sxp"?

I am getting the following message, when I try to sync my items with

/unicorn.aspx?verb=Sync&configuration=&skipTransparentConfigs=0

enter image description here

Here you can see the current tree:

enter image description here

and thats the XML config where I try to sync only some items from this tree in the module Foundation.Serialization.Serialization.config

<!-- Content Basic Structure -->
<include name="Sitecore.Content.Sxp" database="master" path="/sitecore/content">
  <exclude children="true">
    <except name="Sxp" includeChildren="false"/>
    <except name="Sxp/Settings" includeChildren="false"/>
    <except name="Sxp/Global" includeChildren="false"/>
  </exclude>
</include>

the SxpDotCom tree is synced in an other config.

How do I have to structure my config to avoid such problems?

On an other system where none of my node exists I get the following message:

enter image description here

what means that the "sxp" node does not exist :-/

When you need more informations please tell me.

  • 1
    Regarding the first error, Sync means getting the state of items from the Serialization folders into Sitecore. You're getting this errors because the related serialization folder according to the predicate you defined does not exist. Did you perform initial serialization as the error suggests? – TamerM Nov 6 '18 at 8:07
2

It means that Unicorn expects that there is present "Settings" item under "Sxp.Settings" according to the error message: "Default\Sxp.Settings\Settings.yml". But, looking on your tree, "Sxp.Settings" item is absent. So, parent item "Sxp.Settings" is absent for child "Settings". That is why Unicorn is unable to sync this item and show error that could not find parent for "Default\Sxp.Settings\Settings.yml" item in the tree.

It could be caused when you serialized items from one location and then moved them to another location. You can fix it either by editing .yml files to fix paths or by removing wrong serialization and doing it from the scratch.

0

I've found the solution for my problems

  • the first problem was that there was the wrong yml structure deployed on my server :-/
  • for the second problem I was using the "Sitecore.Content.Sxp" unicorn sync in my foundation serialization module, but I forgot that the "Sxp" node uses a template which is defined in another foundation module
  • my solution was to extract the unicorn config part to my project layer common project where I've set all needed dependencies to other modules
  • 2
    I highly recommend that beginners to Unicorn start with only a few configs, with minimal item exclusion trickery. Until more familiar with all the surrounding processes and steps. – Mark Cassidy Nov 6 '18 at 9:47
  • @MarkCassidy I am totally with you :-) but I've just a small project with only one site I am just learning how to use unicorn and I hope its getting better :-) – squadwuschel Nov 6 '18 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.