- This topic has 23 replies, 3 voices, and was last updated 4 years, 8 months ago by Tom.
-
AuthorPosts
-
August 3, 2019 at 4:54 am #974636retroreiz
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
August 3, 2019 at 8:38 am #974875TomLead DeveloperLead DeveloperJust 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?
August 5, 2019 at 2:28 am #975904retroreizRight.
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.
August 5, 2019 at 9:07 am #976284TomLead DeveloperLead DeveloperI 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.
August 6, 2019 at 11:14 pm #977730retroreizHi 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
August 7, 2019 at 8:32 am #978211TomLead DeveloperLead DeveloperGot it. Will test and get back to you.
August 7, 2019 at 8:49 am #978239TomLead DeveloperLead DeveloperJust 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 theirprdctfltr_wc_query()
function.Unfortunately it’s not something we can fix on our end.
Hopefully this helps get it fixed 🙂
August 18, 2019 at 10:57 pm #987586retroreizHi 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
August 19, 2019 at 11:14 am #988203TomLead DeveloperLead DeveloperUnfortunately, there isn’t a snippet we can add to fix this issue. It’s something they need to fix directly inside their plugin.
-
AuthorPosts
- You must be logged in to reply to this topic.