Query trying to set lang instead of page
-
Hello there ??
I have a weird issue on a WordPress website (Multisite). Occasionally, pages that should be using a custom template or a WP template (like archive.php) starts using index.php instead. When this happens, “if (have_posts())” additionally returns false, even though the page (and its contents) does exist. I have to go into the permalinks settings and simply save them (without even changing them). The problem comes back randomly but quickly enough (a few hours)…
Originally, the multisite used WPML for multi-language. The problem started just after the switch from WPML to Polylang (with the “WPML to Polylang” plugin).
Here is the structure of my multisite:
Main site (4 languages):
FR: https://example.com/
NL: /nl/
EN: /en/
DE: /de/Site 2 (4 languages):
FR: https://site2.example.com/
NL: /nl/
EN: /en/
DE: /de/Site 3 (1 language):
FR: https://site3.example.com/The problem occurs almost exclusively on site 3 (but sometimes on other sites). I have installed the “Query Monitor” plugin. When the problem appears on the news listing for example (/actualites), I notice by analyzing the queries that WP is looking for the language “news” instead of the page “news”: https://snipboard.io/UBPbwj.jpg
What could cause this? Is it maybe old WPML settings? How can I be sure everything is well configured?
Thanks in advance,
Sunduck
- The topic ‘Query trying to set lang instead of page’ is closed to new replies.