Closed alexroper closed 2 years ago
Ah yes, this might be an issue, due to Matrix's lack of handling of this. In Vizy we handle this differently to Craft itself does I believe. But this should be handled gracefully already (thanks to a PR), but looks like that's incorrectly implemented.
Fixed for the next release. To get the fix early, change your verbb/vizy
requirement in composer.json
to:
"require": {
"verbb/vizy": "dev-craft-3 as 1.0.9",
"...": "..."
}
Then run composer update
.
For the moment, content is discarded, unlike a standalone Matrix field, purely because of how Matrix field content is stored against other elements (relationally as opposed to a JSON blob like Vizy). It's doable to update every single block to reference the newly renamed field, just a bit of work.
Fixed in 1.0.10
Description
I renamed a field in a matrix used in a Vizy block. When trying to edit an entry with existing matrix data (i.e. using the old field name), I get a "Setting unknown property" exception thrown.
In my case I have a matrix field called "Typologies List" with a block type "Typology" and a field "Related Typology" that was renamed to just "Typology."
Might be related to issue #49.
Expected behavior
I would expect the data from the renamed matrix field might be missing, but that the entry is still editable. Same as changing the handle of a matrix block's field outside of Vizy.
The same problem happens when trying to view a previous revision that has matrix data.
To work around this problem, I had to delete all occurrences of the Vizy blocks that used the matrix and recreate them after I changed the matrix block's field handle.
Steps to reproduce
Additional info
Additional context