Support setting correct values for nested blocklists#285
Support setting correct values for nested blocklists#285timoschraa wants to merge 3 commits intorickbutterfield:v5/devfrom
Conversation
….DeserializeAndClean also executes .ToString()
…rs.Aliases.BlockList because it looks like Umbraco handles it
…rs.Aliases.BlockGrid because it looks like Umbraco handles it (not tested in solution because we don't use a BlockGrid)
|
Hey @timoschraa! Thanks for looking into this and the detail on #284 - it's been really useful for me to get to the bottom of the issue. I've traced the root cause and it's not the recursion in
So for a nested MNTP: the first call converted I've fixed this in 4f0dd01 by:
This way I've also added tests covering nested BlockList/BlockGrid at two and three levels deep, nesting of List and Grid combined, and a regression test specifically for the double conversion you've raised. Going to close this PR since the fix is now on v5/dev, but thank you for the investigation. The log output in #284 was really helpful for pinpointing the issue! #h5yr |
By removing the FormatBlockData when editorAlias = BlockList/BlockGrid it looks like the preview is working for nested blocklists. Also did some refactoring because _blockGridEditorValues.DeserializeAndClean already does a
.ToString().I couldn't test the BlockGrid because we don't use it in our solutions.
Fix for #284.