Open sjcallender opened 2 months ago
I can't seem to replicate this in any browser I'm afraid, and I've replicated your field setup of nested Matrix fields. Certainly seems like a race condition based on the loading "flash" when you reload the page.
This has also happened to me in Chrome with a sufficiently complicated Neo field containing or next to a Hyper field. It stops happening if I disable the timeout added to updateInitialSerializedValue
to fix Vizy compatibility. It does seem like a race condition during initialisation of different JS enhanced fields.
Good find, @stereomyth.
@engram-design, would allowing us to set the timeout value for updateInitialSerializedValue be a reasonable option? Maybe we need to set ours at 1000, for example.
Just pushing some revised changes to address this. To get this early, run composer require verbb/hyper:"dev-craft-5 as 2.0.4"
. I'd love to see if that rectifies this.
Just pushing some revised changes to address this. To get this early, run
composer require verbb/hyper:"dev-craft-5 as 2.0.4"
. I'd love to see if that rectifies this.
@engram-design I went ahead and updated to this on a local dev site, and I'm still getting the issue. It happens immediately after the page reloads from saving.
Thanks for letting me know @daveguillory. Sorry to be a pain, but can you replicate this with as minimal example as possible? Ideally with just the Hyper field, and maybe even disabling every other non-critical plugin. I'm struggling to reproduce these even after manually adding unrealistic timeout values to simulate race conditions.
I am having the same issue with nested fields in Neo and it happens as soon I am entering an entry without any actions. Unfortunately the dev
release doesn't fix it.
Maybe this helps: we are running Craft 5.2.10
on production and are not facing this issue, but on the test system with Craft 5.4.2
. In the meantime something may have changed in Craft causing this?
In 5.3.0 these changes came up:
- Front-end queue runner scripts are now injected before the
tag, rather than at the end of the response HTML.
Maybe this could cause the race condition?
Same exact issue. Extremely annoying behavior.
Will this be fixed somehow? We also have it for some time and it's very annoying for the content editors.
Still trying to replicate this one, it's bizarre that everyone seems to be getting this but me! Working on it ASAP.
@engram-design Have you tried you replicate it with tabbed field layouts? I see it in the example of @sjcallender and I'm having multiple tabs as well where this behaviour occurs.
Still trying to replicate this one, it's bizarre that everyone seems to be getting this but me! Working on it ASAP.
I also have no issue with sharing my project config or veen whole project it that helps.
Looks like itβs only at a nested situation. So hyper field part of an entry, no problem at all. Hyper field as a child of e.g two neo fields is a problem.
More possible clues:
Confirming also this is a nested hyper field.
So I believe I can replicate this in some specific circumstances. Looking into options to address this. I've got a solution that's a combination of Hyper changes and a Craft change, so just working on a suitable PR to Craft for this.
Following up in https://github.com/craftcms/cms/discussions/15794
@engram-design hey thanks for your efforts, but this is affecting sibling fields (a CKEditor field for example) within an entry.
I don't think Hyper is a good choice for us if its mere presence is causing ElementEditor.js
to wig out across the entry.
So this should be fixed in Craft 5.5 and Hyper 2.1. I'm surprised that's showing it on a sibling field, I'll take a look.
I'll try and explain.
The sibling field is a CKEditor field with a few nested entries options.
The sibling Hyper field(s) allow for multiple links.
When multiple links are configured in a sibling Hyper field, the CKEditor field cannot and will not allow one to add nested entries.
When a SINGLE link is configured in the same Hyper field, the CKEditor WILL allow one to add nested entries.
Thanks for the explanation, although it sounds like a different issue to the original draft-creation and showing unsaved changes one?
@engram-design yes it's a different issue. The original issue is nested neo fields and inside those nested ones is a hyper field (single).
@engram-design Yeah it's a different issue! We've ditched Hyper and moved on though. Thanks.
@smockensturm No problem, thanks for the heads up about it, I'll investigate further.
Fixed in 2.1.0, but will need to wait for Craft 5.5 to be released, where they have added their fix.
I can confirm this is now working with Craft 5.5 π
I can confirm that I still have this issue in Craft 5.5.
Discarding the changes doesn't help either.
Me too, still have it at 5.5
@elfacht @DavidKabelitz Going to assume you're also on Hyper 2.1.0. Cleared all the caches? I'm not able to reproduce it on my end. Are we talking multiple levels of Matrix blocks, or just one?
@engram-design
I just saw that the plugin is still set to the dev version as I tried the fix:
"verbb/hyper": "dev-craft-5 as 2.0.4",
I did oversee it to update the plugin. I will update the plugin as soon as I'm back to work on monday β¦
Are we talking multiple levels of Matrix blocks, or just one?
In fact it's in nested Neo blocks where this happens.
@engram-design I'm also having this issue with Craft 5.5 and Hyper 2.1.2, I can consistently reproduce it with 1 matrix block containing the hyper field which in turn contains your Icon Picker field. It also happens with an Entries field, but sometimes I need to switch tabs within the entry to trigger the problem.
https://github.com/user-attachments/assets/970f4916-54f7-4dab-8d19-3e268ef5110f
https://github.com/user-attachments/assets/e2a783bb-c46e-4678-9bfc-730b34e0b235
Hej Josh, @engram-design yes still there at 2.1.2, also deleted cache. It's fixed at another project but still appears at one i am working on. The interesting part and maybe its important. In this case it appears just after changing tabs how @JeroenJRP described. In our case 2 times nested NEO field. First tab active all good (main content we edit on second tab), after change of the tab we see the message again.
We also have the same issue when Hyper is in a Neo block. Latest version of everything.
I just updated Hyper to 2.2.0
and this seems to fix the problem of the initial unsaved changes when entering an entry, but switching the tabs will cause the unsaved changes again.
https://github.com/user-attachments/assets/258b031b-0139-4fcd-9ac7-66cafd4dddbf
I can confirm this is now working with Craft 5.5 π
@bymayo Can you please elaborate how you tested this? Switching tabs still gives me the same issue.
I am having the same issue as @JeroenJRP and @elfacht
I can certainly replicate the changing-tab behaviour. Fixed for the next release. To get this early, run composer require verbb/hyper:"dev-craft-5 as 2.2.0"
.
I have the same problem, I am now on dev-craft-5 as 2.2.0 and CraftCMS 5.5.3, On entries which were ok before, it now does not happen anymore. But on entries having this problem before updating hyper, the problem still exists.
@idleog Can you let me know your field setup, and ideally a video of this happening? Be sure to discard any changes to ensure you're starting fresh.
The video is here: https://www.dropbox.com/s/e4f6wps4khcc0e9/video_craft.mov?e=1&dl=0
setup of field: I think you can see it in the video (hyper in matrix block), If I understnd you right. Else let me know what you need!
Describe the bug
Even with
CRAFT_AUTOSAVE_DRAFTS=false
, our Hyper fields within Matrix fields create drafts, but only when using Firefox (Mac). We can never escape the "Showing your unsaved changes" message.Steps to reproduce
Craft CMS version
6.3.5
Plugin version
2.0.4
Multi-site?
No
Additional context