The issue with permalinks on pages in the primary language
-
Hello,
since the last update, I have been experiencing an issue with permalinks due to the Polylang plugin. Let me describe the behavior. I have a website blog.jirivanek.eu, where the primary language is Czech, and the secondary language is English. The website contains many articles and pages with translations. Now, it frequently happens that WordPress loses permalinks for pages in the primary language, but only for pages, not articles. The situation is as follows:
- Articles in the primary language (Czech) work fine.
- Articles in the secondary language (English) work fine.
- Pages in the primary language (Czech) do not work (result in a 404 error).
- Pages in the secondary language (English) work fine.
As you can see, the permalinks are only lost for pages in the primary language. Clicking on a link to a page in the primary language leads to a 404 error. The issue can be temporarily resolved by regenerating the permalinks (Settings -> Permalinks -> Choose a different permalink structure -> Save changes -> Revert to the original structure -> Save changes). After doing this, everything works fine for a while.
I am using the latest versions of WordPress (6.2.2) and Polylang. The server is running PHP 8.2 and Apache. Apart from updating Polylang, there have been no changes to the server configuration, including server or package updates. The server is running on PHP 8.2 FPM (MPM prefork, but the same behavior occurs with MPM event). The Apache log shows the following warning:
Warning: Attempt to read property “slug” on bool in /wp-content/plugins/polylang/include/crud-terms.php on line 197
This error is generated in the Apache log for every page that is not working at that moment. I am using the current version of Generate Press (free version) as my theme, along with the Elementor page builder and Elementor PRO.
I am unsure if this is a plugin issue or how to proceed further. It is quite problematic to discover that pages in the primary language are not working for several hours or days, and it severely impacts SEO. Currently, I am using a snippet that automatically regenerates the permalinks using flush_rewrite_rules(); if it detects a 404 error for a page. However, even with this solution, I cannot avoid the initial 404 error until the snippet takes action.
Thank you and best regards.
The page I need help with: [log in to see the link]
- The topic ‘The issue with permalinks on pages in the primary language’ is closed to new replies.