Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set copy flags when copying container. #61

Merged
merged 1 commit into from Sep 12, 2016
Merged

Conversation

jone
Copy link
Member

@jone jone commented Sep 1, 2016

⚠️ Target: master (Plone 5), see #60 for Plone 4

Issue:
When copying a DX container which has AT children, the UID of the AT children was not updated.
The reason for the error is that the DX container copy did not have the _v_is_cp flag while the AT children were processed and thus the flag was not properly delegated.

Solution:
By copying the _v_is_cp and _v_cp_refs flags to the copy we have the same behavior as it used to be with AT, which does fix the error.
Closes plone/Products.CMFPlone#1735

Tests:
I could not reproduce the error in a test and therefore could not write a meaningful test. I'd appreciate inputs on how I can do that.
Though I have manually verified that this fix results in no longer having a broken UID index (see plone/Products.CMFPlone#1735 for details).

Plone Versions:
I have the problem on Plone 4.3.x. The PR is therefore pointing to plone.dexterity's 2.2.x branch.

Should I make a separate pull request target master for Plone 5? Does not make sense to fix that for Plone 5 since Archetypes is no longer used there?

When copying a DX container which has AT children, the UID of the AT
children was not updated.
The reason for the error is that the DX container copy did not have the
_v_is_cp flag while the AT children were processed and thus the flag was
not properly delegated.

By copying the _v_is_cp and _v_cp_refs flags to the copy we have the
same behavior as it used to be with AT, which does fix the error.
jone added a commit to 4teamwork/ftw.copymovepatches that referenced this pull request Sep 1, 2016
**Problem:**

When copying a DX container which has AT children, the UID of the AT
children was not updated.
The reason for the error is that the DX container copy did not have the
`_v_is_cp` flag while the AT children were processed and thus the flag
was not properly delegated.

**Solution:**

By copying the `_v_is_cp` and `_v_cp_refs flags` to the copy we have the
same behavior as it used to be with AT, which does fix the error.

- Issue: plone/Products.CMFPlone#1735
- Plone 4 fix: plone/plone.dexterity#60
- Plone 5 fix: plone/plone.dexterity#61
jone added a commit to 4teamwork/ftw.copymovepatches that referenced this pull request Sep 1, 2016
**Problem:**

When copying a DX container which has AT children, the UID of the AT
children was not updated.
The reason for the error is that the DX container copy did not have the
`_v_is_cp` flag while the AT children were processed and thus the flag
was not properly delegated.

**Solution:**

By copying the `_v_is_cp` and `_v_cp_refs flags` to the copy we have the
same behavior as it used to be with AT, which does fix the error.

- Issue: plone/Products.CMFPlone#1735
- Plone 4 fix: plone/plone.dexterity#60
- Plone 5 fix: plone/plone.dexterity#61
jone added a commit to 4teamwork/ftw.copymovepatches that referenced this pull request Sep 1, 2016
**Problem:**

When copying a DX container which has AT children, the UID of the AT
children was not updated.
The reason for the error is that the DX container copy did not have the
`_v_is_cp` flag while the AT children were processed and thus the flag
was not properly delegated.

**Solution:**

By copying the `_v_is_cp` and `_v_cp_refs flags` to the copy we have the
same behavior as it used to be with AT, which does fix the error.

- Issue: plone/Products.CMFPlone#1735
- Plone 4 fix: plone/plone.dexterity#60
- Plone 5 fix: plone/plone.dexterity#61
jone added a commit to 4teamwork/ftw.copymovepatches that referenced this pull request Sep 1, 2016
**Problem:**

When copying a DX container which has AT children, the UID of the AT
children was not updated.
The reason for the error is that the DX container copy did not have the
`_v_is_cp` flag while the AT children were processed and thus the flag
was not properly delegated.

**Solution:**

By copying the `_v_is_cp` and `_v_cp_refs flags` to the copy we have the
same behavior as it used to be with AT, which does fix the error.

- Issue: plone/Products.CMFPlone#1735
- Plone 4 fix: plone/plone.dexterity#60
- Plone 5 fix: plone/plone.dexterity#61
jone added a commit to 4teamwork/ftw.copymovepatches that referenced this pull request Sep 1, 2016
**Problem:**

When copying a DX container which has AT children, the UID of the AT
children was not updated.
The reason for the error is that the DX container copy did not have the
`_v_is_cp` flag while the AT children were processed and thus the flag
was not properly delegated.

**Solution:**

By copying the `_v_is_cp` and `_v_cp_refs flags` to the copy we have the
same behavior as it used to be with AT, which does fix the error.

- Issue: plone/Products.CMFPlone#1735
- Plone 4 fix: plone/plone.dexterity#60
- Plone 5 fix: plone/plone.dexterity#61
jone added a commit to 4teamwork/ftw.copymovepatches that referenced this pull request Sep 1, 2016
**Problem:**

When copying a DX container which has AT children, the UID of the AT
children was not updated.
The reason for the error is that the DX container copy did not have the
`_v_is_cp` flag while the AT children were processed and thus the flag
was not properly delegated.

**Solution:**

By copying the `_v_is_cp` and `_v_cp_refs flags` to the copy we have the
same behavior as it used to be with AT, which does fix the error.

- Issue: plone/Products.CMFPlone#1735
- Plone 4 fix: plone/plone.dexterity#60
- Plone 5 fix: plone/plone.dexterity#61
jone added a commit to 4teamwork/ftw.copymovepatches that referenced this pull request Sep 1, 2016
**Problem:**

When copying a DX container which has AT children, the UID of the AT
children was not updated.
The reason for the error is that the DX container copy did not have the
`_v_is_cp` flag while the AT children were processed and thus the flag
was not properly delegated.

**Solution:**

By copying the `_v_is_cp` and `_v_cp_refs flags` to the copy we have the
same behavior as it used to be with AT, which does fix the error.

- Issue: plone/Products.CMFPlone#1735
- Plone 4 fix: plone/plone.dexterity#60
- Plone 5 fix: plone/plone.dexterity#61
jone added a commit to 4teamwork/ftw.copymovepatches that referenced this pull request Sep 1, 2016
**Problem:**

When copying a DX container which has AT children, the UID of the AT
children was not updated.
The reason for the error is that the DX container copy did not have the
`_v_is_cp` flag while the AT children were processed and thus the flag
was not properly delegated.

**Solution:**

By copying the `_v_is_cp` and `_v_cp_refs flags` to the copy we have the
same behavior as it used to be with AT, which does fix the error.

- Issue: plone/Products.CMFPlone#1735
- Plone 4 fix: plone/plone.dexterity#60
- Plone 5 fix: plone/plone.dexterity#61
@jone
Copy link
Member Author

jone commented Sep 1, 2016

Sorry for the noise! Didn't expect that 😥

@jone jone reopened this Sep 1, 2016
@jensens
Copy link
Sponsor Member

jensens commented Sep 8, 2016

You can always start a Jenkins test-job on your own to test that your pull request (PR) does not break anything.

Below click on the link to Jenkins
screenshot from 2016-07-25 11 20 06

log in with your Github user - if not already done before.

Paste the full pull request URL into the text field (if multiple pull requests need to be combined in one run, then one PR URL per line)

Click on Build

Jenkins reports back to the pull request(s) on Github in the status box at the bottom.

In Plone we value a lot our testing suite, so we usually never merge pull requests if they have not been tested by Jenkins first.

@jensens jensens merged commit 62539d2 into master Sep 12, 2016
@jensens jensens deleted the jone-set-copy-flags-p5 branch September 12, 2016 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plone4: Copy / Paste of DX-Container with AT-Item leads to duplicate UIDs
2 participants