Content breaks when moving or editing a component | Community
Skip to main content
New Participant
October 16, 2015
Solved

Content breaks when moving or editing a component

  • October 16, 2015
  • 2 replies
  • 565 views

Everytime I move or change a property of a resource on my template all existing content break because the content still refers to the old resources.

For example I moved a component from components/content/ to components/structure.

Is there a way to update all content resources as well? So it won't reference components/content anymore but the newly update components/structure?

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Lokesh_Shivalingaiah

yes, it breaks as the resourceType path will be changed in the references. As @scott mentioned, you can update the reference manually if the magnitude of the content is less else you can quickly right a service which search for a resourceType and update with the right path using JCR APIs.

2 replies

smacdonald2008
New Participant
October 16, 2015

When you define a template and a component - the template references the component. That is - the ResourceType -- which is the component's path that is assigned to the template. Moving the component will break the reference between a template and a component.

Its not really good to move a components path. But if you have to sometime - you need to update the ResourceType of the component. To do that - you can do it manually in CRXDE lite. Or you can modify the properties using the JCR API. 

Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
New Participant
October 16, 2015

yes, it breaks as the resourceType path will be changed in the references. As @scott mentioned, you can update the reference manually if the magnitude of the content is less else you can quickly right a service which search for a resourceType and update with the right path using JCR APIs.