Skip Navigation

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.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Andrey 1 year, 2 months ago.

Assisted by: Andrey.

Author Posts
August 30, 2023 at 7:34 am #14310729

evgenyM

About once every two weeks, our sites stop responding, we have a multi-site installation of WP.( hidden link hidden link hidden link) In the logs we see the following error:
WordPress database error Deadlock found when trying to get lock; try restarting transaction for query INSERT IGNORE INTO wp_options ( `option_name`, `option_value`, `autoload` ) VALUES ('wpml.WPML\\TM\\Settings\\ProcessNewTranslatableFields.lock', '1693338353', 'no') /* LOCK */ made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, WPML\LIB\WP\Hooks::WPML\LIB\WP\{closure}, WPML\FP\Promise->resolve, WPML\FP\Right->chain, WPML\FP\Right->map, WPML\BackgroundTask\BackgroundTaskLoader->WPML\BackgroundTask\{closure}, WPML\BackgroundTask\BackgroundTaskLoader->getSerializedTasks, WPML\FP\Fns::__callStatic, call_user_func_array, WPML\FP\Fns::WPML\FP\{closure}, call_user_func_array, WPML\FP\Fns::WPML\FP\{closure}, array_map, WPML\BackgroundTask\BackgroundTaskLoader->WPML\BackgroundTask\{closure}, WPML\BackgroundTask\BackgroundTaskViewModel::get, WPML\Utilities\Lock->create

WordPress database error Unknown column 'wpml_translations.language_code' in 'where clause' for query
SELECT wp_2_posts.*
FROM wp_2_posts
WHERE 1=1 AND wp_2_posts.post_name = 'admin-php' AND wp_2_posts.post_type = 'attachment' AND ( ( ( wpml_translations.language_code = 'en' OR 0 ) AND wp_2_posts.post_type IN ('attachment','wp_block', 'wp_template','wp_template_part','wp_navigation' ) ) OR wp_2_posts.post_type NOT IN ('attachment','wp_block','wp_template','wp_template_part','wp_navigation' ) )

ORDER BY wp_2_posts.post_date DESC

made by require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts

At the moment when the site stops responding, only the complete disabling of the WPML plugin returns the site to work.

And this happens when we have ads on the site. We tried using the Redis cache to reduce the load, but it seems that WPML worked even worse with it. Therefore, now we have disabled the Redis cache. And we also returned to version 4.6.3 of the WPML, since the site worked more stably with it.

August 30, 2023 at 3:21 pm #14314853

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

Thank you for reaching out to WPML support.

You can try clearing the cache by going to WPML -> Support -> Troubleshooting and clicking on the 'Clear the Cache in WPML' button.

If the issue persists, it may be due to an interaction problem with a third-party feature. In this case, you can follow these steps:

- Deactivate all plugins that are not related to WPML

- Switch to a default WordPress theme like Twenty Twenty-one

- Activate each plugin one by one to identify the one causing the interaction issue

Remember to back up your database. If you have a staging site, it is recommended to test the issue there.

August 30, 2023 at 3:55 pm #14315069

evgenyM

We cleared the cache before and it helped to solve the problem for about a week, but since yesterday it does not work anymore.

We can't switch to the default theme because it's a problem in our production site, it doesn't happen in stage. We tried disabling plugins as much as possible, and only disabling wpml itself allows the site to load. And this happens from time to time, perhaps there are some planned actions (cron) in the wpml that lead to the fact that the site stops responding for some time?

Or perhaps setting up multisite and wpml leads to such behavior?
because now the latest version of wpml didn't allow us to add translators to multisites. Only on the main site we could add them, so we returned to the old version of wpml

August 31, 2023 at 8:54 pm #14323553

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

Thank you for sharing your feedback.

This is an unusual issue. To troubleshoot it the best, we must find the steps to replicate it. A few support forum reports say it was incompatible with something else. I understand that a live site doesn't allow us to troubleshoot however we want.

WPML is working fine with a multisite installation. I do not think that is the culprit of the issue.

Our development team is aware of the issue of adding translators with WPML 4.6.5. Please use the following snippet as a workaround:
https://wpml.org/errata/disappearing-translator-list-in-wpml-4-6-5-on-multisite-installations/

Remember to back up your database first before you proceed.