Fix variant invariancy with limited language #17707
Open
+642
−64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Before this PR, there is a bug reported internally that makes it impossible to add/remove blocks from an already saved invariant property with partial variance support.
This PR aims to fix this in a non breaking way.
Todo this, new logic similar to the existing one was added to the valueEditors that currently support this feature (block related ones).
The calling code was then refactored to work with the new logic.
This PR only updates logic that has to do with saving. The old logic is still used in the publishing flow.
Extra
This PR also introduces 2 new attributes for testing to make it possible to configure the UmbracoBuilder in integration tests on a per test or testcase basis without having to rely on magic testcase name strings
Testing
Integration tests have been added to cover adding invariant data in limited language access scenarios to existing content that support variance withing invariant data.