-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Live Preview doesn't update eager-loaded matrix fields #1787
Comments
@brandonkelly do you know if this is also an issue in Craft 3? As well, I would dispute this as being a minor bug, as Live Preview is a pretty big selling point of Craft and having properly-coded Matrix fields not work with it is a big issue (and disabling eager loading would make Live Preview quite slow on complex pages). |
@mildlygeeky Yeah almost definitely still an issue in Craft 3. It’s complicated due to the current implementation of Live Preview, otherwise we would have fixed it. But we have a plan that will fix things like this and #2801: 1. make drafts/versions a system-wide thing, where a single “draft” could include more than just one entry/element (#2116) |
Hey @brandonkelly. We have a number of large sites running Craft and a huge issue for the teams is that we do not have an auto-save feature while editors are creating entries. Do you have any lead time for when this may be made available? |
@stephent2c sorry couldn’t give you a reliable ETA yet; at least 6 months out. |
This issue does make for quite a messy templating setup, assuming you don’t want to abandon eager loading and you still want previews to work reliably. On my current project I’ve ended up with conditional queries like this, which at least gets things working, but it results in loads of deprecation warnings for live previews, since you end up iterating through element queries directly. To work around that I’ve ended up adding custom
|
We’re planning on implementing #1787 (comment) in 3.2 or 3.3. |
This has been resolved for the next 3.2 Alpha release! |
Description
I'm encountering this bug where eager-loaded matrix fields are not updated in Live Preview. It will always show them the way they were when the entry was first opened.
This means that if my matrix field is empty when the page opens and I then enable Live Preview, the section related to the matrix will always be shown empty in the Live Preview. If I was to have some content in the matrix when the page was opened, then that content would always be shown, whether I remove the block or add a new one.
I've read about the dirty workaround described here: https://craftcms.stackexchange.com/questions/15769/find-not-working-with-live-preview but it really is a pain.
Is it in your short-term plans to work on this issue? Isn't it possible to simply disable eager-loading in Live Preview mode? Wouldn't it make more sense?
Steps to reproduce
Additional info
The text was updated successfully, but these errors were encountered: