I have a very strange and anoying problem.
My site is using PageBuilder, Polylang and now WooCommerce (and others plugins).
Everything is working perfectly if I disable PageBuilder, except the layout is broken.
When PageBuilder is enabled, Polylang is not able to display the localized WooCommerce single product page, I get a “That page can’t be found.” error.
More precisely, I can have the website working with those 3 plugins if I enable them one by one then browse the site. However, as soon as the rewrite rules are flushed (for exemple, if Save Changes from the Permalinks settings, or if another plugin flush the rules), the website no not display the localized product anymore. I have the exact same problem with any other custom taxonomies (not only with WC’s products). For example, http://www.davidbriard.com/fr/city/paris-fr/ (City is a custom tax of media) will not work either after the rules are flushed.
If I print_r($wp_rewrite->rules), I can see that all the lines starting by “[(fr)/product/…” are gone.
More over, if I print_r($query->query_vars) in pre_get_posts, I have those two case:
When it works
Array ( [page] => [product] => print-eiffel-tower [post_type] => product [name] => print-eiffel-tower [attachment] =>
When it DON’T works
Array ( [attachment] => tirage-tour-eiffel
I found nothing in your code about rewrite rules so I can’t understand why polylang affect the polylang rewrite rules.
However, PageBuilder seems to do something with queries. May be this is why the custom taxonomies pages are reported to be not found?
This problem is now really blocking as I would like to use another plugin (Hyyan WooCoommerce Polylang Integration), and now my disable/reactivate Polylang workaround do not work anymore :(
Are you aware of this problem?
Have you any suggestion how to modify PageBuilder to resolve that issue?
Thanks in advance for any help!