Problem: The client is experiencing an error with the [esi wpml_language_selector_widget] in the Bricks editor for the secondary language, and issues with currency not updating correctly in the cart when using ESI blocks. Solution: For the Bricks editor issue, we recommend wrapping the shortcode in a conditional to differentiate between the Bricks editor and the frontend. Use the following code:
Remember, WPML does not control how LiteSpeed parses or caches ESI blocks, and issues might arise if ESI is not enabled correctly or if the theme or builder does not support ESI context.
If these solutions do not resolve your issues or seem outdated, please check related known issues, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. We highly recommend opening a new support ticket if problems persist.
Problem: The client would like to lower the amount of HTTP requests, due to each language flag being loaded as an individual SVG file. This results in multiple HTTP requests, which increase Time To First Byte (TTFB) and initial rendering time, particularly affecting visitors on slower networks.
Solution: We have forwarded a feature request to load SVGs programatically instead of using SVG files, which is currently under revision. You can find a custom solution approach for the issue inside the comments of this ticket.
If this solution does not apply to your case, or if it seems outdated, 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.
Problem: You are developing a site and want to display both the English and Welsh translations of the company name on the same template using
bloginfo('name')
. However, using the Site name for English and the tagline for Welsh causes issues when the Site name is translated in String Translation. Solution: We recommend registering the strings manually with fixed source values to ensure they display correctly in both languages on the same page. Here’s how you can do it:
add_action( 'init', function() {
do_action( 'wpml_register_single_string', 'site_settings', 'blogname_en', 'Your Site Name in English' );
do_action( 'wpml_register_single_string', 'site_settings', 'blogname_cy', 'Your Site Name in Welsh' );
});
After registering the strings, you can retrieve them on the frontend with the following code:
$en = apply_filters( 'wpml_translate_single_string', 'Your Site Name in English', 'site_settings', 'blogname_en' );
$cy = apply_filters( 'wpml_translate_single_string', 'Your Site Name in Welsh', 'site_settings', 'blogname_cy' );
echo esc_html( $en ) . ' ' . esc_html( $cy );
This approach ensures that both the English and Welsh names appear on the page regardless of the selected language.
Please note that this solution might be irrelevant if it’s 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 this does not resolve your issue, please open a new support ticket.
Problem: The WPML language switcher only appears on the homepage and does not function on other pages, including a Russian page. The client is using a custom theme. Solution: If you're experiencing this issue, we recommend adding a custom language switcher or using a shortcode or hook/filter. Ensure that: 1. The template where the language switcher is added is translated. 2. The pages where the language switcher should appear are translated and published. We suggest checking the following guides for detailed instructions:
If after ensuring all content is translated and published the issue persists, test with a standard theme to check for conflicts in your custom theme's coding.
Please note that the solution might be outdated or not applicable to your specific case. 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 the problem persists, please open a new support ticket.
Problem: إذا كنت تواجه مشكلة في ظهور تكرار في اسم اللغة وبعض الرموز الغريبة في محول اللغات المضاف إلى القائمة، فقد يكون ذلك بسبب تعارض مع إضافة Unlimited Addons For Elementor أو Animation Addons for Elementor. Solution: أولاً، جرب إضافة محول اللغة مباشرة على الرأسية بدلاً من استخدام الطريقة القديمة. إذا كنت تستخدم Animation Addons for Elementor، قد تحتاج إلى تعديل الكود في الملف
إذا لم تحل هذه الخطوات المشكلة، فنحن نوصي بالتواصل مع فريق دعم Animation Addons for Elementor لمعالجة التعارض. كما نوصي بزيارة صفحة المشاكل المعروفة للتحقق من وجود مشاكل معروفة والتأكد من أنك تستخدم أحدث إصدارات الإضافات والقوالب. إذا استمرت المشكلة، يرجى فتح تذكرة دعم جديدة.
Problem: The client is experiencing an issue where a custom post type 'projekt' displays duplicate entries in a secondary language (Swedish) despite setting the language parameter in WP_Query. The query fetches posts from both the default (Polish) and secondary language, leading to content duplication on the Swedish page. Solution: We recommended removing the 'lang' => $current_lang from the WP_Query and testing without it. If the issue persists, it might be related to other parts of the custom code. We advised testing the issue in a minimal environment using a default WordPress theme and only essential plugins to confirm if the problem is related to WPML or the custom code. Additionally, we provided a working code example for querying WooCommerce products to demonstrate a similar setup that functions correctly. If the problem continues, further debugging of the custom code or consultation with a developer might be necessary.
Please note that this solution might be outdated or not applicable to your specific 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 the issue persists, please open a new support ticket at WPML support forum.
Problem: The client is experiencing an issue where the slug of a translated page (French to English) is deleted after editing meta data with SEOPress, resulting in a 404 error. This problem persists even when SEOPress is disabled or replaced with Yoast, and despite setting WPML to not automatically translate slugs. Solution: We investigated the issue and found that it was related to the Events Manager and Duplicate Page plugins. Disabling these plugins resolved the issue. We recommend using plugins that are officially compatible with WPML, such as WP Event Manager.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, please open a new support ticket. We also 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. For further assistance, you can contact us through the WPML support forum.
Problem: You are working on a site under development and trying to translate pages using the WPML plugin. You encountered issues with custom Gutenberg blocks after translation, specifically an "Attempt Block Recovery" error. Solution: 1. We created a minimal installation of WordPress, WPML, and all necessary WPML add-ons, and themes for you to replicate the issue. 2. Upon further investigation, it appears the issue arises from a mismatch between the stored attribute in the block comment and the actual rendered HTML. For example, the attribute might say
btntext: "View all testimonials es"
but the actual HTML renders as View all testimonials a. This discrepancy causes Gutenberg to flag the block as invalid. 3. To resolve this, manually adjust the mismatch in the code view. Ensure that the block defines the attribute from the anchor text correctly in your block.json or registerBlockType and in your save() function render. Consult with your developer to make these adjustments.
If this solution does not apply to your case, or if it seems outdated, 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 issues persist, please open a new support ticket.
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: The client is experiencing an issue where the
$_POST
variable returns empty when the WPML plugin is active. This problem occurs because the 'action' parameter of the form includes a language parameter (?lang=en), causing a redirect that fails to forward the form data to the intended destination. Solution: We recommend removing the language parameter from the 'action' URL if the default language is English, as this will prevent unnecessary redirects. For handling multiple languages, consider setting up the 'Different languages in directories' option available in WPML -> Languages. This setup helps manage language-specific URLs more effectively. Before making changes, ensure to back up your website and database, and if possible, test these changes on a staging site first.
If this solution does not resolve your issue or seems outdated, please check the related known issues and confirm that you have installed the latest versions of themes and plugins. If the problem persists, we highly recommend opening a new support ticket for further assistance.