-
Notifications
You must be signed in to change notification settings - Fork 672
[5.x]: Saving nested entries of a draft entry doesn't save them in a draft state #17062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
In #16002 (comment) you said you were using the “inline-editable blocks” view mode. Now you’re saying Cards view. Which is it?
To be clear, you are editing the nested entry within a slideout, right? I’m unable to reproduce this. When I edit the nested entry as part of a draft, the nested changes are only associated with the draft, not the Current revision of the owner entry. The only exception is if I open the nested entry in a new tab, and make my edits there. In that case the changes are fully saved to the canonical nested entry immediately. Which is working as expected. The changes in #16002 are only meant to affect editing entries within a slideout. |
It's happening to me in both views. I initially had things in inline-editable blocks, but when I was troubleshooting the issue I saw your mention at the top of #16002 of card view, so I tried that as well, with no change in the outcome. But... I think I figured out what's happening: we have nested Matrix blocks. I've got a Page Builder field that only has what I consider to be "Container" type blocks (eg Regular, Columns, Slideshow, or Tabs), and inside each of those "Containers", there's another Matrix field I've labeled "Content Blocks", with things like Header, Accordion, Image, etc. When I change any of the Container blocks, those properly adhere to the Draft state of the parent entry. It's when I change any of the nested "Content Blocks" elements that the changes show up both in the Draft and Live versions of an entry. |
@brandonkelly Any updates on this? |
I’m still unable to reproduce that. When edits are made to nested Matrix fields, they will only show up on the front end if I’m viewing the entry in Live Preview. Otherwise, they won’t show up on the front end until I’ve saved the recursively-nested entry and the nested entry and applied the top-level entry’s draft. If you send your Composer files and a database backup over to support@craftcms.com, we can look into it further from there. |
Done; thank you!! 🙏 |
What happened?
Description
Related to #16002.
I've got a site heavily relying on a few Matrix-based page builder fields (both in Cards and Inline-Editable block views). When I have an Entry with some blocks in the page builder field, and I create a Draft out of the entry, I would expect that any edits I make to any of the blocks in the various Matrix fields would be considered "Draft" edits, and wouldn't affect the live/current state of things until the "parent" entry's Draft is applied.
In practice, however, what happens is that as soon as I save a block's edits, the live/current version of the page renders with those "draft" changes.
Steps to reproduce
Expected behavior
What happens in Draft, stays in Draft. 🤫
Actual behavior
What happens in Draft, is made known to all. 🫢
Craft CMS version
5.6.14
PHP version
8.2.24
Operating system and version
Linux 5.15.167.4-microsoft-standard-WSL2
Database type and version
MySQL 8.0.36
Image driver and version
Imagick 3.7.0 (ImageMagick 6.9.11-60)
Installed plugins and versions
The text was updated successfully, but these errors were encountered: