Problème : Le client a un problème où, après l'activation d'un filtre sur une carte affichant des custom posts 'points de vente', WPML filtre les posts pour n'afficher que ceux de la langue actuelle. Le client souhaite que tous les points de vente restent visibles, quelle que soit la langue. Solution : Nous avons examiné le code ajouté par le client dans le fichier functions.php pour s'assurer que la fonction
suppress_filters
est correctement utilisée. Cette fonction devrait désactiver les filtres WPML pour la requête spécifique, permettant ainsi d'afficher tous les points de vente indépendamment de la langue. Il est important de vérifier si cette modification affecte uniquement le filtre MAPSVG ou d'autres filtres également.
Si cette solution ne résout pas le problème ou semble obsolète, nous vous recommandons de consulter les problèmes connus, de vérifier la version des correctifs permanents et de confirmer que vous avez installé les dernières versions des thèmes et plugins. Si le problème persiste, n'hésitez pas à ouvrir un nouveau ticket de support.
Problem: You are using the MotoPress reviews add-on with WPML, and reviews posted in Dutch are visible, but not in English on your multilingual site. Solution: First, ensure that the reviews are set as 'Translatable' in WPML settings. Navigate to WPML -> Settings and check under the post types section if Reviews is translatable. If not, change this setting.
If the issue persists, it might be due to the lack of official compatibility between the MotoPress reviews add-on and WPML. We recommend setting up a test environment to replicate the issue. You can use a minimal installation of WordPress, WPML, and necessary add-ons to test. If you're unable to resolve the issue, consider hiring a developer for a custom solution.
Alternatively, use specific shortcodes for each language page to display the correct reviews. For Dutch, use:
If this solution does not apply to your case, or if it's outdated, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.
Problem: The client was experiencing an issue where strings translated using the
__('...');
function were not translating correctly for some languages, despite working previously. The issue was observed on a live site, while a local development site with outdated plugins did not exhibit the problem. Solution: We first confirmed that the client was using the gettext method for adding code inside their theme and translating strings via WPML > String Translation. We then suggested regenerating custom MO files from the WPML > Support > Troubleshooting page. Upon further investigation, we discovered that the client's theme was missing the text domain definition in the style.css file. After adding the required text domain and rescanning the theme's strings, we removed and re-translated a specific string to ensure WPML generated a fresh translation file, resolving the issue.
If this solution does not apply to your case, or if it seems outdated, we recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should the problem persist, please open a new support ticket.
Problem: The client reported a bug in WPML version 4.7.6 where an error occurs when clicking the '+' button on a page with custom fields. The error message displayed is: 'Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array.' This issue was linked to the handling of XML configurations for serialized custom fields. Solution: We identified that the XML file for the custom forms was misconfigured. Specifically, the 'optinText' field was expected to directly provide a text value for translation, but it was actually stored inside an array. To resolve this, we adjusted the XML configuration to correctly map the 'optinText' field as follows:
After modifying the XML and clearing any existing translation jobs for this form, the error was resolved, and the translation process proceeded without issues. We recommend the client to apply this XML configuration change and verify the results.
If this solution does not apply to your situation, or if it seems outdated, please check the related known issues and confirm that you have the latest versions of themes and plugins installed. If the problem persists, we highly recommend opening a new support ticket at WPML support forum.
Problem: You are encountering a PHP warning related to the WPML plugin, specifically an 'Undefined array key "REQUEST_METHOD"' error. This issue occurs in non-browser contexts such as WP-CLI commands, scheduled cron jobs, or when custom code triggers certain WPML functions outside of a normal page load. Solution: To address this issue temporarily, you can modify your custom code to set the 'REQUEST_METHOD' in the $_SERVER superglobal before WPML functions are called. Here is how you can do it:
<?php<br />$_SERVER['REQUEST_METHOD'] = 'GET';<br /><br />// ... rest of the script.
We have already reported this issue to our developers, and a fix will be included in future versions of the plugin.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable 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 further assistance is needed, please open a new support ticket at WPML support forum.