Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

New Products Blocks > filter by cat > wrong data retrieved for Preview/Published (ok in site editor) #7867

Closed
Marc-pi opened this issue Dec 7, 2022 · 5 comments
Labels
block-type: product-query Issues related to/affecting all product-query variations. type: bug The issue/PR concerns a confirmed bug.

Comments

@Marc-pi
Copy link

Marc-pi commented Dec 7, 2022

Describe the bug

With the new Products Blocks (ex Query Loop)
Filtering by one category only works only in site editor
Preview and Published version are wrong : filter is not working, all products from all cats are displayed

To reproduce

Steps to reproduce the behavior:

  1. Create products linked to several categories that are not child of each others (only top parent categories)
  2. Add the products block within a new WP Page
  3. Add Taxonomy Category filter, set on 1 category only
  4. Observe result within site editor vs preview vs published

Expected behavior

The 3 pages status should retrieve the same product list (e.g retrieve the same content)
Here only the site editor version is ok.

Category filter does not work on preview and published page.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

WP6.1.1
Woo Blocks 9.1
Gutenberg plugin 14.6.1
WC 7.1
TT2 Theme

@Marc-pi Marc-pi added the type: bug The issue/PR concerns a confirmed bug. label Dec 7, 2022
@imanish003 imanish003 added the block-type: product-query Issues related to/affecting all product-query variations. label Dec 26, 2022
@imanish003
Copy link
Contributor

I confirm that issue is reproducible.

@Marc-pi
Copy link
Author

Marc-pi commented Feb 1, 2023

ping, the issue is still there with Woo Blocks 9.5 !!!! And it is a major one
The use case : add products query block, set with a filter in block settings on 1 category
What's wrong :

  • currently Editor view is wrong (all products from all cats are displayed)
  • preview and published are ok (only products from the selected cat in block settings are displayed)

Seems someone tried to fix, but reverted the previous buggy behavior !!

image

@imanish003
Copy link
Contributor

Hey @Marc-pi,

Thank you for bringing this to my attention. 🙌🏻

After conducting a thorough investigation, I have found that the problem lies within the "Query Loop" block in the Gutenberg editor. As a result, the issue is also present in the "Products" block, which is a variation of the "Query Loop" block. I have discovered that there is already an open issue regarding this on the Gutenberg repository (WordPress/gutenberg#29438), and I have added my observations as a comment for reference.

@Marc-pi
Copy link
Author

Marc-pi commented Feb 2, 2023

@imanish003 thanks a lot, i'll follow up over there also

@Marc-pi
Copy link
Author

Marc-pi commented Mar 14, 2023

fixed by #8611 in 9.8.0
i close

@Marc-pi Marc-pi closed this as completed Mar 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block-type: product-query Issues related to/affecting all product-query variations. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

No branches or pull requests

2 participants