-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Query block: Editor preview is different from the frontend #29438
Comments
In a single page there is no much use in having an inherit Query, but instead a custom one. In general we need to find a way to detect the context a Query lives (page/archive) and set the inherit option accordingly, but this is not yet implemented. |
This issue is still present in WordPress 6.1.1 and Gutenberg v14.7.3. It would be great if this option were not offered if there is no template to inherit the query from, or at the very least if the inherit query option were disabled by default. |
This problem exists even when In Screen.Recording.2023-02-02.at.3.37.51.PM.movAs you can see in the video, When I add a product category, the products don't update in Editor. Although, correct products show up when I view them on frontend after saving. This issue was reported in Woocommerce products block, which is a variation of Step-by-step reproduction instructions
What's expected?Only selected category products should show in Editor. |
the WC Products Block issue is fixed with WC Blocks 9.8.0 see woocommerce/woocommerce-blocks#8611 |
Awesome, thanks for the update @Marc-pi. |
i'll find some time to test to above issue with GB purely (original post) |
Query block doesn't take the template into account. This results in a difference between the editor and actual content on the frontend.
Enabling "Inherit query from URL" should take into account what template is being edited. In this case, I'm editing the Page template so the query loop should only consist of a single page object.
Screenshots
Editor:
Frontend:
The text was updated successfully, but these errors were encountered: