verbb / vizy

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

Some Custom Vizy Blocks Display with Fields Hidden/Not generated in DOM #258

Open zhua89cc opened 1 year ago

zhua89cc commented 1 year ago

Describe the bug

I'm noticing some custom vizy blocks when added only display the name with none of the fields rendered. Looking at the elements it seems the div doesn't even get generated with the fields. I'm seeing some JS errors related to vue and UILayerManger.js (see screenshot). Also noticing the spacing with the fields seem messed up when using the grid percentages in the field manager (there should be some padding between when using 50%)

Vizy Version: 2.1.9 Craft: 4.5.1

Steps to reproduce

  1. Create a custom vizy blocks with different types of fields.
  2. Add it to a vizy builder to see if it renders
  3. I've had some better luck seeing this issue when the vizy block has an entries relational field associated with it. Screen Shot 2023-09-21 at 10 58 53 AM
  4. Once you get the blank block if you refresh the page it does seems to load the fields albeit with it appearing to be disabled.

Craft CMS version

4.5.1

Plugin version

2.1.9

Multi-site?

No

Additional context

This is happening locally and in production.

zhua89cc commented 1 year ago

Update: I had updated an entries field in those blocks that weren't pointing to any channels. It seemed to have disabled the blocks in the field manager modal when configuring the vizy field.

Found a second issue when saving a custom block that has a relational assets field pointing to a new volume I created. On save it seems to collapse and remove the fields in the dom.

Screen Shot 2023-09-21 at 2 30 25 PM Screen Shot 2023-09-21 at 2 30 40 PM
engram-design commented 1 year ago

Looks like this has to do with some UI elements added to the field layout, which mess up Vizy blocks. However, we're supposed to be handling that as dismissable tips/warnings will throw this error.

I've managed to first find a way to handle these sorts of fatal errors a bit more gracefully for the next release.

I'm not sure what you mean about the grid widths? I can't see that in your screenshots.

I can't seem to replicate any issue (or the error message) when using entries and assets fields. Would it be possible to get a screen recording of it in action, just in case I'm not following the specific steps you might be?

zhua89cc commented 1 year ago

Here's a screen recording. Thanks again Josh! It seems specific to when a block is using an assets field pointing to a new volume I created.

https://www.loom.com/share/9fe8da1af9534824bb99108c5fdf28ee?sid=70df00ca-3275-41bd-aaee-301c675e0e53

engram-design commented 1 year ago

Thanks for the video and confirming all that. Indeed, seems to be related to an assets field, but only for a particular volume. Any other plugins installed?

What makes me think something else might be going on is the extra settings cog against a field:

image

That's not something on my install. But then that exists for other fields and it's fine. I'll spin up a Servd site just in case it's something specific there, or their Assets plugin.

Looks like that first error is fixed in https://github.com/craftcms/cms/issues/13605 so worth updating to that first.

zhua89cc commented 1 year ago

I'll keep digging and update with any findings.