hyper
hyper copied to clipboard
"Showing your unsaved changes." keeps popping with hyper fields
Describe the bug
When opening an entry with a Hyper field "Showing your unsaved changes." keeps popping up after not making any changes. When discarding changes and changing tab this reappears.
By disabling Hyper plugin this doesn't happen anymore. Same on all entries with no hyper fields.
Steps to reproduce
- going to an entry an entry with a hyper field, changing tab and Showing your unsaved changes. appears
- Discard changes, change tab. Message reappears
Craft CMS version
5.7.1
Plugin version
2.2.4
Multi-site?
Yes
Additional context
No response
Can you comment on what your Hyper field looks like - as in your link type field layout - what attributes and custom fields do you have added? I have seen this happen with element-based links, but we should be taking care of that.
My hyper fields have following link types:
- Site
- Asset
- URL
I have no custom fields, just the default ones in the content tab: linkValue and linkText (this is selected as mandatory. Default link Type is Site, Enable New Windows is enabled, the other two options are disabled, Translation Method is "translate for each language".
Thanks for clarifying, that all seems pretty basic. Do you see the same behaviour if you pick a certain link type, or it happens no matter the link type you pick?
We’re seeing the same issue on one of our sites after the latest updates to CraftCMS and Hyper in the development environment. Previously, we were running CraftCMS 5.6.5.1 and Hyper 2.2.3 without any issues.
In our case, the Hyper field is nested within a Neo field (also updated from 5.2.23 to 5.4.2).
If I recall correctly, we encountered the same issue a while back when using older versions of CraftCMS and Hyper. The issue then disappeared but has now resurfaced.
Let me know if I can provide any additional information.
Righto, I'll test with Neo - it's not triggering this behavior for me in top-level Hyper fields, and I've tested those link types.
I'm also seeing this issue, and not using Neo.
It seems to happen whenever you interact with the page, before that it is fine.
Craft CMS: 5.7.4 Hyper: 2.2.4
Just a Hyper field with either a single or multiple link option:
https://github.com/user-attachments/assets/189e8cf5-8fde-4724-ba78-4a8ec33b1c2a
Looks like the latest update of Hyper (2.2.5) fixes this. At least for us the update resolved the issue. 👍
I'm still seeing this problem with the the latest version of Hyper (2.2.6) and Craft 5 under these conditions:
- The Hyper field is in an entry type assigned to a Matrix field.
- The Matrix field is on the second tab when editing an entry (or any tab other then the default tab when editing an entry).
- The entry type block in the Matrix field containing the Hyper field is NOT collapsed (when the block is initially collapsed and subsequently opened, the problem does not occur)
- Clicking on the second tab causes the 'unsaved changes' message to appear.
@croxton Looking into this, but not immediately able to reproduce:
- What's the layout of the Matrix field (cards, inline-blocks, etc)?
- What link type is the Hyper field using (Entries, URL, etc)?
- Is the Hyper field setup for single or multiple links?
And a quick video - https://share.cleanshot.com/Jn7qt7lJ
@engram-design
- Matrix is set to inline blocks
- Enabled link types are Asset, Category, Email, Entry and URL (default Entry)
- The Hyper field is limited to one link
One further detail that I should have added: the Hyper field is inside another Matrix field, which is also set to inline blocks. So this is a Hyper field inside a Matrix inside a Matrix.
Thanks for confirming that. So I see it's happening even for a URL based link as well. There were some complications with element-based links which is why I asked about it.
I've also testing nested Matrix fields, but no different on my end. I'll continue playing with this and maybe even replicate your other field types in those Matrix fields just in case. If you're up for isolating things by removing all other fields so it's just Matrix > Matrix > Hyper, that'll be handy too.
Aha, it's due to the Custom Attributes being on the first tab for Hyper fields. That's just down to how serialization of the editable table component happens.
Fixed for the next release. To get this early, run composer require verbb/hyper:"dev-craft-5 as 2.2.6".
Amazing thank you!
Updated in 2.2.7.