This thread is resolved. Here is a description of the problem and solution.
Problem: The client is attempting to delete a secondary language from their website but is encountering an infinite deletion process. They want to have only one language on the website and remove WPML without causing errors. Manually deleting pages, products, and other assets leads to errors on live pages. After a WPML reset, translated files, posts, and pages remain and need to be removed manually. Solution: 1. Ensure that there are at least two languages activated on the site before attempting to delete the secondary language. 2. If the deletion process is infinite, check the debug log for any notices related to WPML that could be causing the issue. For example:
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /****/test/wp-content/plugins/sitepress-multilingual-cms/classes/API/REST/class-wpml-ate-proxy.php on line 128
3. Perform a full site backup before attempting a WPML reset. 4. After backing up, you can proceed with the WPML reset by following the instructions in this documentation. 5. After a WPML reset, the original posts, taxonomy terms, and media files will not be deleted, only the WPML configuration and translated contents will be cleared.
If this solution does not seem relevant to your situation, please open a new support ticket here.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
For WPML to work as expected, it is required that there are 2 languages activated at all times. This means you need your site's default language and at minimum 1 more secondary language, please ensure that is the case before deleting RU.
Once that is done, try to delete RU and let us know your results.
To enable the WordPress Debug log, open your wp-config.php file of site root and look for define('WP_DEBUG', false);. Change it to:
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
In this case, the errors will be saved to a debug.log log file inside the */wp-content/* directory. Please try to remove the language and check if you are getting any errors or warnings related to WPML in the log file.
If you can paste your debug.log to http://pastebin.com/index.php and provide me that link it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess of discussion).
Thank you for the updates. The Debug log is showing the following notice related to WPML. But it will be causing this bug.
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /****/test/wp-content/plugins/sitepress-multilingual-cms/classes/API/REST/class-wpml-ate-proxy.php on line 128
Just to make sure, you want to delete the secondary language completely, after that only the default language contents will exist on the site, am I correct?
If so, please try the WPML reset after a full site backup{mandatory} and make sure you are getting the expected results or not. Once we reset it will not be possible to restore the data.
Thank you for the updates. Once we reset WPML or remove a secondary language its contents will automatically deleted from the site. We don't have to delete manually.
Thank you so much for your help! The main problem was solved, anyway.
Regarding manually deletion: all translated files, posts and pages were saved after WPML reset, so I still need to remove it manually. The same warnings is in the note about WPML reset.
Thank you for the feedback. That means WPML will not delete the original posts, taxonomy terms and media files when we reset. It will only clear the WPML configuration and translated contents. So we don't have to worry about.
Also, WPML will only keep the data in database and it will be cleared when we reset. Please verify.