verbb / vizy

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

Vizy not loading project config changes #246

Closed baileydoestech closed 10 months ago

baileydoestech commented 10 months ago

Describe the bug

We are seeing issues with Vizy not picking up project config changes, this looks to be the same issues reported in https://github.com/verbb/vizy/issues/111, https://github.com/verbb/vizy/issues/95 and https://github.com/verbb/vizy/issues/88 which were closed without a resolution.

This isn't always consistent, sometimes works but other times not and the only resolution we have been able to find is a full project reapply which isn't ideal. Not really able to provide an more than what has been said in the linked issues - the project config changes appear to apply correctly and have not seen any issues outside of Vizy (with native Craft fields etc). The issue seems to happen mostly when new Craft fields are added to new Vizy blocks but I couldn't be certain as it's difficult to reconcile across developers, environments.

Steps to reproduce

  1. Make changes locally on a developer site (i.e new Vizy block, new fields)
  2. Commit changes to source code and apply to another environment with project config sync
  3. New fields do not appear in the Vizy block as expected

Craft CMS version

4.4.17

Plugin version

2.1.8

Multi-site?

Yes

Additional context

We also have our CP on a different sub-domain to the main sites (i.e. admin.site.com, site1.site.com, site2.site.com)

engram-design commented 10 months ago

For those related issues, we never were able to get to the bottom of it, and no responses from the issuers. I'll have another crack at reproducing this, but I figure it must be some form or race condition where the newly added fields aren't created first before Vizy's config data is applied.

And just to confirm, you're seeing changes in your Yaml files as you make Vizy fields changes, they're just not being applied as you'd expect?

baileydoestech commented 10 months ago

Yes correct - see them in the changes and apply but nothing appears. The fact that a full project config resync resolves it does make me think a race condition.

If I get it happen again soon will capture a screenshot and see what else I can get but nothing in the logs. Potential this is more likely to occur with SuperTabke fields but that is just anecdotal

Happy to provide anything else to debug

mattbloomfield commented 10 months ago

Whenever this happens we can handle it by Reapplying changes. It's been more rare over the past year.

baileydoestech commented 10 months ago

As in reapplying all changes or just selective (if the later would be good to know how)

Seems like this is fairly consistent when creating a NEW field in Craft CMS and then adding this to an existing Vizy field (the new field just doesn't appear post apply)

baileydoestech commented 10 months ago

@engram-design did you manage to see if you could reproduce this on your side?

engram-design commented 10 months ago

I haven't been able to reproduce this, no matter what I've tried with a few different combinations of new/existing fields.

I have pushed up a potential fix regardless, if you can test out? To get this early, run composer require verbb/vizy:"dev-craft-4 as 2.1.8"

engram-design commented 10 months ago

Fixed in 2.1.9

GaryReckard commented 6 months ago

I'm experiencing this issue on Vizy 1.0.23 (got a Craft 4 upgrade in discussion, but still a little ways away). Any chance this fix could be applied to a Craft v3 version of Vizy? Thonks!