2

We have setup Sitecore CLI and are able to do PULL and PUSH successfully in the Dev environment. Same steps we have followed in the higher environment (PreProd) but getting below error

/sitecore/content/**** (***GUID***) attempted to be cached, but the
cache already contained /sitecore/content/****. Non-unique paths
cannot be serialized. Please choose a different item name.

When we check the respective error prone item in Sitecore, Item Id is different but item name is the same. However same items successfully able to do PULL and PUSH in Dev environment. But fails in higher environment. In higher environment (PreProd), we are using non-interactive login whereas in Dev environment, we are using interactive login. Is there any cache settings that we have to enable/disable in higher environment. Please advise.

3 Answers 3

0

This error is usually caused by duplicated items in sitecore. I would check your preprod env. Most likely you'll find duplicates (in terms of items with the same name). You can delete the one which you dont want and then do pull again. Or, if you dont need to do pull then you can delete both and run push again.

Problem is that sitecore saves ymls based on item name. Then, if you have 2 items with the same name in sitecore, it doesnt know which one to pull/push.

If the problem is only in higher env just try to delete the items which you having issues with and run serialization push again.

0

As per my knowledge, there is no cache setting that can help with this kind of error. As this is looking like a duplicate content issue.

Before pushing the item, you should validate your content using these commands.

dotnet sitecore ser validate

dotnet sitecore ser validate --fix

If there is an error you can fix those before pushing content to your environment.

Read more

https://doc.sitecore.com/xp/en/developers/101/developer-tools/the-cli-serialization-command.html

0

Sitecore support team suggested to upgrade Sitecore CLI to 5.1.25 where this was one of the known bug in 5.0.16 has been fixed.

Issue details:

522517 - NonUniquePathException in CLI when multiple items with the same name are present under different folders.​

More details here:

https://dev.sitecore.net/Downloads/Sitecore%20CLI/5x/Sitecore%20CLI%205125/Release%20Notes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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