verbb / vizy

A flexible visual editor for Craft CMS
Other
44 stars 8 forks source link

Project config changes don't get applied to Vizy field in matrix #59

Closed d-karstens closed 3 years ago

d-karstens commented 3 years ago

Description We've been running into an issue where settings for a Vizy field inside a matrix aren't getting applied when running project-config/apply. Have tried using the --force flag, and ensured there aren't any pending migrations. The settings are saved in the config as far as I can see, just not applied.

Let me know if you need any more info!

Steps to reproduce

  1. Create a Vizy field inside a matrix field
  2. Change some settings
  3. Try to apply the settings in a different environment

Additional info

Additional context

engram-design commented 3 years ago

I can't seem to replicate this sorry. It seems particularly odd that not even the force flag works, given the Vizy field yaml file exists. I've tried this on a few installs so far...

d-karstens commented 3 years ago

Oh that's weird, I thought it could just be something with our set up, but I was able to replicate on a fresh Craft install with no other plugins this morning and did a screen recording

It seems like the config is applied in the field settings but doesn't come through in an entry until the settings are resaved

https://user-images.githubusercontent.com/21274925/126582238-fa8420e2-4482-488b-a5e4-e083ee95ef57.mp4

rungta commented 3 years ago

We’re facing this issue as well. We have a Vizy field inside a matrix field which has a block with two fields. Project Config is able to create the block in question, but fails to apply the field layout of that block.

To fix we have had to:

  1. Temporarily enable admin changes,
  2. Make some/any change to the field layout of the block in question so that the project config file registers a change,
  3. Then discard those changes from project config using Git,
  4. Re-apply the project config and this time, surprisingly, the fields show up as expected!

Craft Pro 3.7.3.2 Vizy 1.0.4

engram-design commented 3 years ago

@mokopan Ah, I see - it's the editor that the block types don't show up on. Sorry - I was checking they were coming up in the field settings, which they are for both of us.

So it looks like the inner fields on a Matrix, when updated, don't emit a "changed field" event in project config, which is what we use to refresh the field layout for a Vizy field.

Should be 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.4",
  "...": "..."
}

Then run composer update.

d-karstens commented 3 years ago

Thank you! Was beginning to be unsure if we were doing something wrong craft setups on our end 😅

Unfortunately we're now running into this error when saving a matrix field containing a Vizy block

Screen Shot 2021-08-02 at 11 25 46 am
engram-design commented 3 years ago

Just pushed a fix for this, if you can composer update again?

d-karstens commented 3 years ago

Works perfect now, thanks again!

engram-design commented 3 years ago

Fixed in 1.0.5