core icon indicating copy to clipboard operation
core copied to clipboard

Copy host mixes up relationship

Open ghost opened this issue 13 years ago • 4 comments

We noticed that after a 'copy host' action, some content with relationships were altered on the source host. We investigated this and were able to reproduce it on the demo site:

  1. Create a structure called "Parent"
  2. Add a text field called "title", which is required, system indexed and show on listing
  3. Add a host field called "host", which is required + show on listing
  4. Create a structure called "Child", with the same fields
  5. Create a relationship between parent-child (just select "Parent" as parent and "Child" as child)
  6. Create a child on demo.dotcms.com with title "child 1" (the host field is set to demo.dotcms.com)
  7. Create a child on demo.dotcms.com with title "child 2" (the host field is set to demo.dotcms.com)
  8. Create a parent on demo.dotcms.com with title "parent", and make the 2 child content its children (the host field is set to demo.dotcms.com)
  9. Copy the host demo.dotcms.com to demo-copy.dotcms.com (copy all)

When you look at the parent content on demo-copy.dotcms.com, then you'll see that everything is fine. But when you look at the parent content on demo.dotcms.com, you'll see that it is linked to the child1 and child2 on demo.dotcms.com AND the child1 and child2 on demo-copy.dotcms.com.

Please also double-check if there are more issues with the relationships, because we have also seen other strange behavior with relationships that we can't reproduce on the demo site (multi-language stuff).

ghost avatar Nov 04 '13 11:11 ghost

Has EE fix also

jtesser avatar Nov 20 '13 14:11 jtesser

Fixed, tested on master 2.5 and now it is working fine

bryanboza avatar Nov 21 '13 16:11 bryanboza

Unfortunately we had this issue again after a copy host in 2.5.3. After some investigating I noticed that it only happened with linked content that was German or had multiple language-versions. English seemed OK. I'll try to reproduce it on the demo website later.

Xander-Steinmann avatar Mar 06 '14 16:03 Xander-Steinmann

I was able to reproduce this on the demo site, and created a screencast: http://www.screencast.com/t/XGtAj07X It had an unexpected side-effect, which is that both the content on the demo.dotcms.com as the content on copy.dotcms.com had double relationships. I did not see that in our PRD environment.

Xander-Steinmann avatar Mar 10 '14 08:03 Xander-Steinmann