If you are making changes to the number of languages your site is available in, you can delete all languages except for the default one. This action also removes the translations for the deleted languages from your site and database.
If you additionally want to uninstall WPML, you can do a WPML reset. This removes all remaining WPML tables from the database.
Problem:
The main domain is mydomain.be. The second domain is mydomain.com. My objective here is: when people are in Dutch, they see the .be site. When they're in English, they see the .com site.
Solution:
Set up both domains to point to the same server IP address and the same directory where WordPress is located. Alias configuration should all point to the same physical folder where your WordPress is being installed. URL should show the same website.
Problem:
String Translation - domain is missing from the list when using HAML Solution:
The 4.0.7 version is an older version and since then there have been plenty of changes made to our code.
As WPML itself does not scan or officially support HAML files I wouldn't be able to point out what change was made that could have caused this behavior with HAML files.
One of the functions that scan the templates has changed. It's possible the new function does not scan non-PHP files
Line 31 of wpml-string-translation\classes\strings-scanning\wpml-st-theme-plugin-scan-dir-ajax.php will allow .haml files to be scanned by changing:
$file_type = array( 'php', 'inc' );
to
$file_type = array( 'php', 'inc', 'haml' );
However, I tried this and it doesn't catch the strings in Haml.
You might want to examine the following file which should be where all the actual processing is happening:
wpml-string-translation\inc\potx.php
NOTE: I did test with version 4.0.7 of WPML and its version at the time of String Translation and it still does not scan HAML files.
Once you go to WPML->Themes and Plugins localization-> Scan your theme and then you get a list of all the files scanned, only .php files are scanned.
Problem:We added a custom Chinese language but hreflang is wrong
Solution:1. Go to WPML->Languages -> Add a new language and add the default Chinese language again
2. Click on "Edit languages"
3. Change the hreflang from the default language to something else and update
4. Now you should be able to assign the correct one to the new custom CN language
Problem:
Half of the products has featured images, the other half has not.
Solution:
1. Make sure you have marked both options for media attachments on your original product: 'Duplicate uploaded media to translations' and 'Duplicate featured images'. Then try saving and updating your original and translated product.
2. You can use Media translation plugin and in WPML>Settings>Media translations and try to sync images.
- You need to make sure you click the 'Start' button
Problem: We are getting this error:
Error log is showing the following:
PHP Fatal error: Uncaught InvalidArgumentException: element_id and type do not match for element_id:7283 the database contains post_page while this function was called with post_attachment in xxxx/content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php:32\nStack trace:\n#0 xxxx/content/plugins/sitepress-multilingual-cms/sitepress.class.php(1497): WPML_Set_Language->set('7283', 'post_attachment', false, 'en', NULL, true)\n#1 xxxx/content/plugins/sitepress-multilingual-cms/classes/media/duplication/class-wpml-media-attachments-duplication.php(1016): SitePress->set_element_language_details('7283', 'post_attachment', false, 'en')\n#2 xxxx/wordpress/wp-includes/class-wp-hook.php(286): WPML_Media_Attachments_Duplication->batch_set_initial_language('')\n#3 xxxx/wordpress/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)\n#4 xxxx/wordpress/ in xxxx/content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-set-language.php on line 32, referer
Solution: In this case the fastest way to solve the issue is by following this steps:
- Create a full backup of the site.
- Connect to the database -> in the wp_posts table delete the row with element ID = 7283
- Double check if the issue persists.
- Repeat this process if the error message appears again with another ID.
Note: Please don't forget to create a full backup of the site because if something goes wrong you will have to restore it.
This code was inserted into the WPML >> Settings >> Custom XML Configuration section. Afterward, the string became available for translation, and we added a translation via WPML >> String Translation.
This page includes support tickets that are resolved and documented. Looking for tickets that are “in progress”? Visit the complete support tickets archive