-
-
Notifications
You must be signed in to change notification settings - Fork 25
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. #60
Conversation
Nice work! I'm sorry for not noticing that when I did add some similar 👍 for Plone 5 support. There are still famous add-ons like Jonas Baumann wrote:
|
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.
dc4897e
to
d385d80
Compare
I have added a Plone 5 PR at #61 with the same change (cherry pick). Tests: |
**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
**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
**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
**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
**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
**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
**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
**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
Sorry for the noise! Didn't expect that 😥 |
2.2.x
(Plone 4), see #61 for Plone 5Issue:
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).