Hi,
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!
Best regards,
Hi,
I’ve found where the problem is and a workaround.
in polylang/include/links-permalinks.php, there is this function:
When PageBuilder is disabled:
When it is enabled:
My workaround is to add the missing types in function.php of my theme
Do you know if it is a problem related to Polylang or PageBuilder?
If PB, iIs this something that you can fix in the next release?
Best regards,
Hi David
Thanks so much for reporting this.
We weren’t aware of the issue. Polylang is our “go to” free translation plugin for Page Builder so this is important.
This thread is really clear and well laid out, thanks for that. Let me chat to Greg about the issue and come back to you with some feedback.
Thank you :)
Could you perhaps confirm the plugin you’re using to bridge WooCommerce and Polylang. They don’t appear to work together by default.
I seemed to have good results with:
Hyyan WooCommerce Polylang Integration Plugin
I now use “Hyyan WooCommerce Polylang Integration” which allow to synchronize the custom fields between localized product and localized product attributes.
However this bug is not related to this plugin.
It is not related to WooCommerce too, as I also have the bug with my custom taxonomies (created with Types plugin).
Here a quick test you can do to see if you can reproduce the bug:
1. Install and configure WooCommerce, Polylang, PageBuilder, create an english (default lang) product, then localize it to french for example.
2. Disable all plugins.
3. Activate only WC, Polylang, and PageBuilder.
4. Try to view the localized (french) product. I get a page not found.
5. Disable Polylang.
6. Activate Polylang.
7. The localized product page is OK
8. Either Save permalinks, or go to polylang settings and save string translation.
9. The localized product page display page not found error.
10. Disable PageBuilder.
11. Everything works as expected. I have no bug anymore.
Without Hyann’s plugin, my workaround was to deactivate then reactivate Polylang, but with Hyann’s plugin, this workaround do not work anymore, I don’t know why…
I hope you can reproduce this bug.
Hi,
If it’s of any use to anyone, it seems that the problem is still the same and that your workaround, David, is still the right answer untill something is implemented in polylang…
Tested with :
WP version : 4.5
Polylang version : 1.8.5
Woocommerce version : 2.5.5
Hyyan WooCommerce Polylang Integration version : 0.25
Regards,
Séb.
Sorry, i forgot :
Page Builder by SiteOrigin verion : 2.4.6
Séb.
Hi,
Same problem !
Wordpress version 4.4 (latest version not compatible with theme)
theme accesspress parallax pro
polylang v 1.8.5 (latest version)
page builder v 2.4.6 (latest version)
Portfolio links to foreign languages : 404 error, excepted if desactivating page builder plugin, which is not satisfactory at all !
Looking on various forums many users report some incompatibility between Polylang and Page Builder by site origin but could not trace any issue. (unsuccessfully tried to add David Briard hack to my theme function.php file)
Please help !!!
By the way, some people report that using Page Builder version 2.0.4 would solve the problem, but could not find this older version
Anticipated Tks
Best regards
Hi,
I’m having the same issue with Polylang + Woocommerce + PageBuilder, everything works great, except when I click on any product, I get a “page not found” error.
Did you ever find a solution for this?
Thanks!
Mica.
Also same issue here,
WP Version: 4.6
Polylang: by Frédéric Demarle – 2.0.3
Page Builder by SiteOrigin: by SiteOrigin – 2.4.13
SiteOrigin Widgets Bundle: by SiteOrigin – 1.6.5
Hyyan WooCommerce Polylang Integration: by Hyyan Abo Fakher – 0.27
WooCommerce: by WooThemes – 2.6.4
Hack from David Briard would crash my site and until I remove it again from function.php via ftp.
Would also be happy about some solution.
Hi there!
I’ve found this issue in my wordpress instalation.
WP 4.6
WooCommerce 2.6.4
Polylang 2.0.3
Page Builder por SiteOrigin 2.4.13
Toolset Types 2.2.1
If I try to edit a blog post I get a page not found error. If I disable Page Builder I can edit the post.
I have some pages where I use page builder for the layout and I could’t edit them as I get a page not found error. I disabled Types and I was able to edit the content of the pages.
I hope this can help to anyone.