NO BUG: WP Grid Builder facet issues with looped component

WP Grid Builder facet element, for category filtering, does not work properly with components. The posts get duplicated, when a category gets selected.

Setup

  • Archive template (any archive page should do)
  • Query looped Component (is main query active)
  • WP Grid Builder Facet to filtering post category with buttons

Result/Issues

  • Looped component query not selectable in WP Grid Builder Facet element
  • Workaround: Copying component ID and manually referencing ID in Bricks, leads to duplication of posts, when a category gets selected

Workaround: Don’t use components for filtered grids.

Hi @Maexxx,

It appears that this is related to WPGridBuilder integration, so it’s probably best to contact them because they are the one maintaining it.
But the components are new and still in the experimental phase, so some issues are expected. :crossed_fingers:

I will set this topic to no-bug for now, as it does not seem to be a bug on Bricks side.

Best regards,
Matej

I am not sure on which side it is. Thought the data that WP grid Builder works with, should be the same, no matter if it is a compknent or not. So I am not sure this is a WB GB issue.

Can you also reproduce the same with our filters? If yes, then we will absolutely have a look at it, and figure out what is happening.
But, if it’s only happening when using WPGB, then it’s very likely that WPGB is not yet compatible with the way components work, and only they can test, check their code and identify the issue.

Best regards,
Matej

With Bricks 2.0 beta, I don’t understand why plugin developers should need to adapt anything, when I use my Event card component with a query loop property.

I’d love to just create an Event card component put a query loop over it and it’s done.

The problem seems to be the “Select a grid or element to filter”, which expects the ID of the looped HTML element, which is not the component’s Bricks ID.

Hi @Maexxx,

like I explained above, components are a new way how the structure is handled and depending on how WP Grid Builder is integrated, they will need to adapt.
It will still work for normal elements like before.

Matej

I experienced the same issue and this is a quote from the answer that I have received from WPGridbuilder support:

That’s correct — WP Grid Builder facets can’t filter Bricks query loops placed inside Components. Components encapsulate their own query context, which prevents the facet system from detecting the loop.

This is a pity, as components are a game changer, and in most aspects better than element templates.

1 Like

OMG Everything still breaks when a Bricks component and a loop is involved. Many times I have to remove the component and replace it with the plain structure to fix bugs.

I would not need any query inside a component, but Bricks forces us to do so, when creating a card component.

So in the end we cannot use components with WP Grid Builder facets?

Is that the reality @Matej?

Hey @Adrien,

like I said twice above, this depends on WPGB implementation, and it’s not something that we control.

Best regards,
Matej

Are you talking with WPGB team? Are they aware or working on that?

Have you tried wrapping the component in a div, and looping the div with the query?

Hi @Adrien,

no, as far as I know, we are not. In cases like this, it’s best if you contact them directly, and if they need to, they can freely contact us for help via email.

Best regards,
Matej

I have the same problem. Everything worked fine between Bricks and Grid Builder until this latest Bricks update. I have several client websites using these filters, and all three are no longer working.

downgraded to older version(s) dosent solved the problem, so yes, it seems thats a WPGB problem, not Bricks.

I found the culprit! Disabling Happyfile PRO solved the problem. Tested on 2 websites…