Problème : Le client a ajouté l'italien et l'espagnol à son site multilingue, qui affichait déjà l'anglais sans problème. Cependant, une erreur critique apparaît sur les pages en italien et en espagnol. Après avoir désactivé les plugins, le client a identifié un conflit avec le plugin B2BKing Pro. Solution : Nous avons vérifié que l'API REST fonctionnait correctement, éliminant ainsi les problèmes de connexion au serveur. Le problème d'erreur critique était dû à une règle de
flush_rewrite
configurée par le plugin B2BKing Pro, qui ajoutait un dossier de langue inutile dans l'URL, rendant celle-ci inaccessible. Nous avons apporté une correction au fichier
Problem: The client reported that the JavaScript file 'wpgmp-project-filters.js' was not loading on their site's translated pages for German (de), French (fr), Norwegian (no), Danish (da), and Swedish (sv) languages, although it was loading correctly for English (en), Dutch (nl), and Spanish (es). Solution: Initially, we suggested clearing all caches (plugin, server, Cloudflare, etc.) to see if that resolved the issue. Upon further investigation, we discovered that the problem was due to custom code in the file
wp-content/themes/kebonyglobal/functions.php
. Specifically, the function
kebony_relocate_inline_scripts()
contained a line of code that needed commenting out:
// strpos($src, 'project') !== false ||
After making this change, the JavaScript file should load correctly on all language versions of the site.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket.