WPML url patching break valid permalinks
-
In wp-content/plugins/google-sitemap-generator/class-googlesitemapgeneratorstandardbuilder.php, build_posts(), a patch was added trying to fix permalinks with secondary languages in WPML. Everything related to $siteLanguages array.
Our website, have a lot of custom permalink filters, and google-sitemap-generator patch results in invalid URL listing. The post slug is at the begging and the end of the permalink for all secondary language content.
Since all our permalinks are already valid in english (primary) and french (secondary), i’ve added a $patchUrlLanguage (false) condition around both function_exists icl_get_languages/pll_the_languages so that $siteLanguages remains empty.
Maybe a plugin option or a plugin filter could help to activate/deactivate the secondary languages URL patching.
The topic ‘WPML url patching break valid permalinks’ is closed to new replies.