[Support request] Price range filtering – Breaks the header

Home Forums Support [Support request] Price range filtering – Breaks the header

Home Forums Support Price range filtering – Breaks the header

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #974636
    retroreiz

    Hi Tom,

    if the plugin is only active, the error does not happen. Only when the feature “Filter” is activated, then the error happens.

    Yes, something in the way I suspect too. So you’re on a non-archive product page and then of course the element no longer grabs. But why does not the element which is “Entire Site” actually work? So it would have to at least the Element grip which is used on all sides. I only used a header for the test in the elements which applies to all pages “Entire Site” in my WordPress installation.

    Can I somehow create an “Element Header” that works for these price ranges?

    Greetings, Andreas

    #974875
    Tom
    Lead Developer
    Lead Developer

    Just to make sure, if you:

    1. Deactivate all Elements except the Header Element in question
    2. Set this Header Element to “Entire Site”

    It still doesn’t show when the price filter is set?

    #975904
    retroreiz

    Right.

    I’ve deleted all elements for the test and left only one element header “Entire Site”. When the filter is active, it destroys the header.

    #976284
    Tom
    Lead Developer
    Lead Developer

    I would need a copy of the plugin to debug further, unfortunately. It seems like something in the plugin is either changing the template and removing the necessary hooks, or breaking the way core WordPress conditionals function.

    It might be worth checking with the plugin author to see if there’s any custom templating going on.

    #977730
    retroreiz

    Hi Tom,

    i upload the plugin on my webhost https://retroreiz.de/codecanyon-23673114-xforwoocommerce-wordpress-plugin.zip
    Please let me know as soon as you have downloaded it, then I delete it from the server again.

    I will ask the developers of the plugin this and will contact you again.

    Thank you and greetings, Andreas

    #978211
    Tom
    Lead Developer
    Lead Developer

    Got it. Will test and get back to you.

    #978239
    Tom
    Lead Developer
    Lead Developer

    Just went into their code and I think I see the issue.

    When you filter something, they use pre_get_posts to alter the query. Our Elements module uses a query itself, and the plugin is altering the Elements query as well as the products query.

    To fix this, they should add a check for $query->is_main_query in their prdctfltr_wc_query() function.

    Unfortunately it’s not something we can fix on our end.

    Hopefully this helps get it fixed 🙂

    #987586
    retroreiz

    Hi Tom, please excuse the belated answer!

    Thank you for the extensive analysis of the problem 🙂

    Since I do not know much about PHP. How accurate should the PHP code be so I can put that into my PHP snippets?

    Thank you Tom!

    Greetings Andreas

    #988203
    Tom
    Lead Developer
    Lead Developer

    Unfortunately, there isn’t a snippet we can add to fix this issue. It’s something they need to fix directly inside their plugin.

Viewing 9 posts - 16 through 24 (of 24 total)
  • You must be logged in to reply to this topic.