Live Preview with Matrix on a Commerce Product Validation #2600
Unanswered
pdaleramirez
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When using Live Preview with Matrix on a Commerce Product, if you add a Matrix block that has required fields on it, but don’t fill all those required fields the block will refuse to display in LP until all required fields validate. But, there are no errors showing on the block in the LP editor so no way of knowing why a block isn’t showing unless you mentally parse the requirements of the block and understand that it won’t show until it is valid.
On other elements that use the new draft-based LP (like Entries) blocks always try to show up, which causes other problems if you rely on Craft’s validation in your templates (which you shouldn’t, because of reasons). This is quite nice really, because you can code your block templates to handle missing required content gracefully, and even do things like output blindingly obvious errors in the LP panel using craft.app.request.isLivePreview (or whatever it #is).
In an ideal world, I’d like Commerce Products to use the same LP engine as Entries, but I appreciate the complexities of this, so perhaps when in LP could Matrix blocks just always try and render, regardless of if their validations pass? I appreciate this spirals out into other elements like Categories too ...
Ticket: 17235
Beta Was this translation helpful? Give feedback.
All reactions