Ticket #13431 (confirmed Bug)

Opened 3 years ago

Last modified 3 years ago

Checking out a folder does not preserve contained working copy relationships

Reported by: Travv15 Owned by:
Priority: minor Milestone: 4.x
Component: Versioning Version: 4.1
Keywords: Cc:

Description

Plone 4.1.5
plone.app.iterate 2.1.5

To see the behavior:

  1. Create a folder ('foo')
  2. Create a page ('bar') within folder 'foo'
  3. Checkout a working copy ('copy_of_bar') of page 'bar'
  4. Checkout a working copy ('copy_of_foo') of folder 'foo'
  5. Checkin 'copy_of_foo'

Now, 'bar' is still locked but no longer shows the info viewlet linking to the working copy. 'copy_of_bar' appears to have become a normal (non-wc) page. Interestingly, this break doesn't occur if you checkout the page after checking out the folder (ie. checkout 'bar' within 'copy_of_foo').

Change History

comment:1 Changed 3 years ago by Travv15

Looks like it's breaking on the folder checkout. If you look at the pages in 'copy_of_foo', 'copy_of_bar' is already acting like a non-wc page, so step 5 is extraneous.

comment:2 Changed 3 years ago by kleist

  • Status changed from new to confirmed
  • Component changed from Unknown to Versioning

comment:3 Changed 3 years ago by Travv15

Created a band-aid that disallows working copies within working copies

comment:4 Changed 3 years ago by kleist

Travv15: thanks for your help, this means we have a patch?

comment:5 Changed 3 years ago by Travv15

Kinda. The little bit I added will prevent broken working copy references, but iterate not copying any forward references from the baseline children to the working copy children is the root of the problem. This causes other issues. For example,

  1. Create folder 'foo'
  2. Create pages 'doc1' and 'doc2' within 'foo'
  3. Add relation to 'doc1' pointing to 'doc2'
  4. Checkout 'foo'

Now the relation 'doc1 -> doc2' is not attached to 'doc1' in the working copy folder. If we checkin 'foo', the working copy items overwrite the baseline items and we lose that reference forever (or until someone re-adds it).

comment:6 Changed 3 years ago by Travv15

Added some code to recursively handle references. Before it was only copying the forward references of the containing folder.

This fixes (well, prevents) the problem for me.

Note: See TracTickets for help on using tickets.