craft-neo
craft-neo copied to clipboard
Content disappears on save
Description
For no reason, some Redactor fields got their content disappears after save. There's no error on save, and nothing in the log.
Sometimes we can see the content in previous revisions, but we can't get it back: it's not added when Revert to this entry. Looks like a Neo bug, because regular fields haven't this issue.
This is very annoying because it's on a live website where we can't add our content correctly. Unfortunately, I haven't more details as I can't replicate this issue on each save. Let me know what would be relevant to send to your support. Thank you!
Other information
- Neo version: 2.12.4
- Craft version: Craft Pro 3.7.30.1
- Multi-site: yes, but without propagation
- Is eager-loading used? No
I've been unable to reproduce this so far. If the Neo block with the Redactor field has other content, does that content save/revert correctly when the Redactor field doesn't? If it does, then this could be a bug with the Redactor plugin. It did have a new version (2.9.0) released recently - if you've upgraded it, does it still happen if you downgrade to the previous version you were using? (Or if you haven't upgraded it, does it still happen after upgrading?)
Thank you for pointing this out. I see that Redactor has released a new fix probably for that. I will test in production and will let you know if the bug still occurs.
Experiencing this issue also — All content inside Neo fields will vanish on save. I can also see the content in previous revisions, but content will still disappear after confirming the revert.
Craft version: Craft Pro 3.7.32 Neo version: 2.12.4 Redactor version: 2.10.0
@chrispinion Just to be clear: you are saying that all field content in Neo blocks is failing to save/revert properly, not just Redactor field content?
@ttempleton that's correct — I have plain text, assets, entries, dropdowns, and LinkIt fields that appear to be losing their content.
Thanks @chrispinion. If possible, could you please send your composer.json/lock and database backup to [email protected], along with information about which entry this happens with, and any additional steps we should know to reliably reproduce the issue, and we'll have a look at it.
Thanks for sending that @chrispinion. I see that the revision content isn't merging into the provisional draft that's being edited for the entry, and I've since been able to reproduce that on my usual testing environment. The revision content is still being merged into the underlying entry - if I discard the changes to an entry after applying a revision, the revision content is there. It looks to be happening with all fields on an entry, though, not just Neo fields - for instance, I created a section with only a couple of plain text fields, and could also see it happen there - so it isn't being caused by Neo.
Regarding the Neo field content being lost to begin with, though, I'm guessing that something has gone wrong in Neo when creating the provisional draft. I still haven't been able to reproduce that bug, and I'll keep an eye out for it, but definitely appreciate any extra info that anyone has on how that can be reproduced.
We just faced the same bug on the home page of a production website. Some edits made to a Redactor field made all the blocks in the entire Neo field to disappear.
Neo version: 2.13.1 Craft version: Craft Pro 3.7.27.2 Multi-site: no
@rungta Are you able to reliably reproduce that?
Yes, we can reproduce it reliably. Making any edits to the field consistently removes all the blocks.
On 25-Mar-2022, at 08:06, Thomas Templeton @.***> wrote:
@rungta Are you able to reliably reproduce that?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
@rungta If possible, could you please send your composer.json/lock and database backup to [email protected], and also let us know in the email which entry this happens with.
Thanks for sending that through, @rungta. It turned out the blocks disappearing was being caused by a bug in the Preparse Field plugin, which is fixed in the latest version.
Woops. Sorry about that @ttempleton and thank you for pointing out the issue with the Preparse Field plugin. Upgrading that does seem to fix the bug.
If anyone experiencing the Neo content loss on save on Craft 3 has since upgraded to Craft 4, I'd be interested to know if it's still happening on Craft 4.
@ttempleton A similiar issue is happening in latest Craft 4 versions: https://github.com/spicywebau/craft-neo/issues/627
@mini71 That's a different issue - that concerned the loss of a Neo field's blocks if all of the blocks were disabled, whereas this one concerns the loss of blocks' contents, not the blocks themselves.
Hi @ttempleton, I'm having an issue with content in Neo blocks disappearing on save, and am able to reproduce somewhat consistently in multiple environments on Craft 4. I'll email my composer.json/lock and database backup files.
Craft Version: Craft Pro 4.4.16.1 Neo Version: 3.8.3 Multisite: No
Thanks for sending those files @ch-turnstyle, unfortunately I've been unable to reproduce it so far. When you're able to reproduce it in multiple environments, is that reproducible on multiple entries as well?
My best guess at this point is that this is somehow a timing issue with when Neo content is changed vs. when the draft is being saved, and that I'm just not getting the timing right... I'll keep trying it and seeing if I can get it to happen.
Thanks for trying @ttempleton, yes it'll happen on multiple entries in the same session. Thinking out loud here, but I'm kind of wondering if it only happens when I go a little fast during content pop, or have multiple tabs open at the same time? I've made a point to just work slower and that seems to help, but sometimes it happens on the first Neo block I add to an existing page - typically those blocks with any child blocks. It's just odd that I'll see the content I've entered in the logs, but on save or refresh it's as if that content never existed.
Let me know if you're able to repro, and thanks again for looking into this.
Thanks for the extra emailed info @ch-turnstyle, with that info I was able to reliably reproduce the issue (Neo using the wrong block ID for the Neo block's subfields if the block was created between saving the provisional draft and dynamic Neo subfield conditions being applied). That should now be fixed in Neo 3.8.5, but please do let me know if it happens again.
Awesome! Seems to be fixed for me now 🚀