This is an old issue, and it was resolved in our old 8.2 instance by a prior dev but after upgrading to 9.0 the issue has reappeared. When a user copies or duplicates an item, all of the local components that are children of that item are copied, but the datasources of the renderings on the copied parent item all point to the original local components rather than the new ones.

For example:

  • Duplicate /sitecore/content/Example with name Example2
  • Example2 is successfully created, as well as /sitecore/content/Example2/local components and /sitecore/content/Example2/local components/RichText
  • However, the Rich Text rendering on Example2 has a datasource of /sitecore/content/Example/local components/RichText instead of /sitecore/content/Example2/local components/RichText

I've been trying to find solutions but all of the posts I've found are really old and reference blogs that no longer seem to exist. Is there a patch for this, or any current blogs that explain how to fix this?

  • 1
    Does the Smart Commands module provide any insight into how this problem can be solved? github.com/AlenPelin/Sitecore-Smart-Commands Jul 4 '19 at 2:27
  • I don't think this is an issue, Sitecore works in this way. if you want to do something like this, you may need to write your custom code for event or command. As @MichaelWest suggested you can use Sitecore smart commands module Jul 4 '19 at 13:26

It's not an out of the box feature, however there is a way to do this. Check out this blog post for the details. http://byteium.com/2019/02/update-rendering-datasources-on-item-copy You want to test to see if the item at the relative path exists, and if it does, you might assume that it's safe to set it as the copied items rendering datasource.

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.