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

Ensure new UDIs for blocks when copying #8842

Merged
merged 4 commits into from
Sep 8, 2020

Conversation

Shazwazza
Copy link
Contributor

This is when we do a full node copy (not a JS copy). When that occurs we need to re-generate new UDIs for each block in the block list value. We do this already for Nested Content too and just like NC this code will deal with nested block editors and even nested block editors within nested other complex editors that are in a block editor.

I've come to realize however that this is still problematic and it's the same for Nested Content. If there's a block editor, or nested content within another complex editor where the root editor is not itself then the GUIDs/UDIs won't be replaced in that nested json data. I'm not too worried about that scenario for now for the 8.7 release since that scenario probably won't exist very often but it's something to consider in the future.

All of this logic will need to be entirely deleted and/or refactored when blocks of data are stored as centralized/shareable element blocks in the database umbraco/rfcs#24. That will have it's own challenges for what 'Copy' actually means.

For testing:

  • Review the code
  • Ensure all tests pass
  • Test that copying a node in the back office that contains block editor data works. Verify the data stored for that property in the [umbracoPropertyData] table for the original content item against the property data stored for that property for the copied content item. The value should be the same however the UDIs/GUIDs will be changed.

@warrenbuckley warrenbuckley self-assigned this Sep 8, 2020
@warrenbuckley
Copy link
Contributor

✔️ Ensure all tests pass

@warrenbuckley
Copy link
Contributor

✔️ Review the code

Off to test this out manually & verify 😄

@warrenbuckley
Copy link
Contributor

All works as expected with test
image

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.

2 participants