verbb / hyper

A Craft CMS plugin for managing links, focusing on user experience.
Other
21 stars 9 forks source link

Craft keeps marking Neo field dirty when block includes a Hyper field #133

Closed chrismlusk closed 2 months ago

chrismlusk commented 3 months ago

Describe the bug

After save, Craft immediately marks a Neo field with the changed status if a block includes a Hyper field. I'm seeing this whether the Hyper field is empty or not.

Steps to reproduce

  1. Have a Neo field with a block that includes a Hyper field.
  2. Add this block to an entry.
  3. Save.

Craft CMS version

4.8.6

Plugin version

1.1.26

Multi-site?

Yes

Additional context

Neo version 4.0.8

mscherr-fastspot commented 3 months ago

I have the same issue and thought it was Neo, but turns out it might be Hyper.

Adding related ticket for more clarity: https://github.com/spicywebau/craft-neo/issues/875

engram-design commented 3 months ago

I can't seem to replicate this one, sorry. I've tested with solo Hyper fields, and Matrix/Neo combinations, different link types, including custom fields - all seems to be okay..

Very likely due to https://github.com/verbb/hyper/commit/477d023c529490d32e0bb919f9f8c7e8e6da0a15 which fixed another issue.

Can you confirm if you see this without Neo? If so, what's your Hyper field settings look like?

mscherr-fastspot commented 3 months ago

@engram-design it's very bizarre, here is what I'm seeing:

https://share.cleanshot.com/3lg7vV5Q

That video has all my settings, etc and showing what you requested.

Let me know if you need anything else or if I should maybe bring up again in the Neo issue?

It seems intermittent / based on a very specific context. In the video, the first field layout has no problem saving the field individually, along with within a Neo field (I created this Neo field just now for testing this).

But when I move over to our design system Neo field, it seems to work without a Hyper field, but has the issue with one.

Thanks so much for looking into this.

engram-design commented 3 months ago

Thanks for the video, I can see in your first example that there's no change triggered. I've even replicated your Neo block just in case those other fields are a factor, but no dice.

If it's at all possible to grab your database, sending that to support@verbb.io would be massively helpful. I can certainly try some fixes on my end, but without being able to replicate it to test it's a bit of a stab in the dark I'm afraid!

ttempleton commented 3 months ago

Just to clarify, in addition to my comments at https://github.com/spicywebau/craft-neo/issues/875#issuecomment-2036096821 - I am able to reproduce this on a Craft install in which Hyper is the only installed plugin and the only created field, so I don't believe this bug has anything to do with Neo or any other field type.

Oddly, it seems to (at least in my experience today) go away after hitting discard on the draft a few times, even after reimporting the DB, clearing all caches, and trying it in a different browser. But I have a database backup that I imported into a fresh Craft install where it did happen again, so I'll send that in shortly in case it's helpful, hopefully it happens for you as well @engram-design.

engram-design commented 3 months ago

@ttempleton Much appreciated Thomas, I'll be giving that I go!

I believe I know why this might be happening (similar issue with Vizy), which is related to a Vue-based field, just struggling to reproduce it.

mscherr-fastspot commented 2 months ago

@engram-design just adding a breadcrumb, I sent my database to the email you requested. Thanks in advance! Let me know if you need anything else.

engram-design commented 2 months ago

Thanks to everyone's help, that should be fixed for the next release. To get this early run composer require verbb/hyper:"dev-craft-4 as 1.1.26"

engram-design commented 2 months ago

Fixed in 1.1.27