Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing database errors indicating a missing 'review_status' column or a non-existent 'wp_icl_background_task' table in your WPML plugin, it might be due to recent changes or migrations in your site.
Solution:
First, we recommend checking if the 'review_status' column exists in your 'wp_icl_translation_status' table. You can do this by logging into your database using a tool like PHPMyAdmin. If the column is missing, please ensure you have backed up your site, then run the following SQL queries to add the missing columns:

ALTER TABLE `wp_icl_translation_status` ADD COLUMN `review_status` enum('NEEDS_REVIEW','EDITING','ACCEPTED') COLLATE utf8mb4_unicode_ci DEFAULT NULL;
ALTER TABLE `wp_icl_translation_status` ADD COLUMN `ate_comm_retry_count` int UNSIGNED DEFAULT '0';

After applying these changes, verify if the issue persists.

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 problem continues, please open a new support ticket.

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 Bigul 1 year, 7 months ago.

Assisted by: Bigul.

Author Posts
August 28, 2024 at 6:44 pm #16116740

AIM-DOO

Hello, More errors were generated in the error log related to this plugin.

[28-Aug-2024 16:41:00 UTC] WordPress database error Unknown column 's.review_status' in 'field list' for query SELECT j.rid,
				j.translator_id,
				t.translation_id,
				s.batch_id,
				j.translated,
				j.manager_id,
				s.status,
				s.review_status,
				s.needs_update,
				s.translation_service,
				s.uuid,
				s.ate_comm_retry_count,
				t.trid,
				t.language_code,
				t.source_language_code,
				iclt.field_data AS original_doc_id,
				iclt.job_id,
				ito.element_type AS original_post_type,
				j.title,
				j.deadline_date,
				j.completed_date,
				j.editor,
				j.editor_job_id,
				j.automatic,
								  SUBSTRING_INDEX(ito.element_type, '_', 1 ) as element_type_prefix
						FROM wp_icl_translate_job j
                JOIN wp_icl_translation_status s
                  ON j.rid = s.rid
                JOIN wp_icl_translations t
                  ON s.translation_id = t.translation_id
                JOIN wp_icl_translate iclt
                  ON iclt.job_id = j.job_id
                JOIN wp_icl_translations ito
                  ON ito.element_id = iclt.field_data
                    AND ito.trid = t.trid
                
			            LEFT JOIN wp_posts p
                  ON ito.element_id = p.ID
                     AND ito.element_type = CONCAT('post_', p.post_type)
						WHERE j.job_id IN (2722)
						  AND iclt.field_type = 'original_id'
			            LIMIT 1 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/td-composer/legacy/Newspaper/page.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, td_global_blocks::proxy_function, tdc_zone->render, tdc_composer_block->do_shortcode, do_shortcode, preg_replace_callback, do_shortcode_tag, td_global_blocks::proxy_function, vc_row->render, tdc_composer_block->do_shortcode, do_shortcode, preg_replace_callback, do_shortcode_tag, td_global_blocks::proxy_function, vc_column->render, tdc_composer_block->do_shortcode, do_shortcode, preg_replace_callback, do_shortcode_tag, td_global_blocks::proxy_function, td_flex_block_1->render, td_flex_block_1->inner, td_module_flex_1->render, td_module->get_image, get_edit_post_link, current_user_can, user_can, WP_User->has_cap, apply_filters('user_has_cap'), WP_Hook->apply_filters, WPMLLIBWPHooks::WPMLLIBWP{closure}, WPMLFPPromise->resolve, WPMLFPRight->chain, WPMLFPRight->map, WPMLFP{closure}, WPMLTMATEReviewReviewTranslation->WPMLTMATEReview{closure}, WPMLTMAPIJobs::__callStatic, call_user_func_array, WPMLTMAPIJobs::WPMLFP{closure}, call_user_func_array, WPMLTMAPIJobs::WPMLTMAPI{closure}, WPMLTMAPIJobs::getElementJob, call_user_func_array, WPMLFP{closure}, call_user_func_array, WPMLTMAPIJobs::WPMLTMAPI{closure}, WPMLTMAPIJobs::__callStatic, call_user_func_array, WPMLTMAPIJobs::WPMLFP{closure}, call_user_func_array, WPMLTMAPIJobs::WPMLTMAPI{closure}, WPML_Translation_Job_Factory->get_translation_job_as_stdclass, WPML_Translation_Job_Factory->get_translation_job, WPML_Translation_Job_Factory->retrieve_job_data
[28-Aug-2024 16:41:03 UTC] WordPress database error Table 'cordmagazine.wp_icl_background_task' doesn't exist for query SELECT * FROM wp_icl_background_task WHERE task_status IN ('1','0','2') AND 1=1 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, WPMLLIBWPHooks::WPMLLIBWP{closure}, WPMLFPPromise->resolve, WPMLFPRight->chain, WPMLFPRight->map, WPMLBackgroundTaskBackgroundTaskLoader->WPMLBackgroundTask{closure}, WPMLBackgroundTaskBackgroundTaskLoader->getSerializedTasks, WPMLCoreBackgroundTaskRepositoryBackgroundTaskRepository->getAllRunnableTasks, WPMLCoreBackgroundTaskRepositoryBackgroundTaskRepository->getAllByTaskStatus
August 28, 2024 at 7:04 pm #16116833

Bigul

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve the issue.

Have you migrated the site recently? Please log in to your database (using a tool like PHPMyAdmin) and open the wp_icl_translation_status table, then make sure the
*review_status* column exists in the table or not. Refer to the attached image for more details.

--
Thanks!

Bigul

2024-08-29_00h31_20.png
September 4, 2024 at 12:17 pm #16140336

AIM-DOO

Hello,
in this table (wp_icl_translation_status) i have big amount of entries. And in this table i have not this entries wich is on your sreenshoot

In this table i have not *review_status*

No, I haven't migrated the site recently.

C-_Users_jovan_Desktop_Untitled-1.jpg
September 4, 2024 at 3:49 pm #16141792

Bigul

Hello,

Thank you for the updates. As per the screenshot you have shared the *wp_icl_translation_status* table is missing two columns. So please access the database via tools like PHPMyAdmin (after a site backup) and run the following query. Then make sure the bug exists or not.

ALTER TABLE `wp_icl_translation_status` ADD COLUMN `review_status` enum('NEEDS_REVIEW','EDITING','ACCEPTED') COLLATE utf8mb4_unicode_ci DEFAULT NULL;
ALTER TABLE `wp_icl_translation_status` ADD COLUMN `ate_comm_retry_count` int UNSIGNED DEFAULT '0';

--
Thanks!

Bigul