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.

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

Problem: The String Translation module does not update neither adds new string.

An error in regards to WordPress database error Unknown column 'field_wrap_tag' in 'field list' appears on the debug.log.

Solution: In order to solve the issue, some SQL queries will need to be executed manually. See the relevant documentation beneath this paragraph.

Relevant Documentation: https://wpml.org/forums/topic/wordpress-database-error-after-updating-wpml-unknown-column-wrap_tag-in-fie/

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by alexQ-2 3 weeks, 1 day ago.

Assigned support staff: Andreas W..

Author Posts
September 17, 2019 at 4:52 pm #4590329

alexQ-2

I am trying to: Update translations in 'String translations'. New strings don't appear neither.

I expected to see: Strings translated into the correct language. The strings appear correctly translated in string translation, not in front.

Instead, I got: Strings in the default language. I had a look to the error logs and this is what I found:

WordPress database error Unknown column 'field_wrap_tag' in 'field list' for query INSERT INTO `wp_icl_translate` (`job_id`, `content_id`, `field_type`, `field_wrap_tag`, `field_format`, `field_translate`, `field_data`, `field_data_translated`, `field_finished`) VALUES ('2354', '0', 'field-_yoast_wpseo_title-0', '', 'base64', '1', 'R3VpZGUgVG8gTWFyY2gncyBJbnRlcm5hdGlvbmFsIEhvbGlkYXlzIC0gUGhvcmVzdCBCbG9n', 'R3VpZGUgVG8gTWFyY2gncyBJbnRlcm5hdGlvbmFsIEhvbGlkYXlzIC0gUGhvcmVzdCBCbG9n', '') made by edit_post, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, do_action('wpml_tm_save_post'), WP_Hook->do_action, WP_Hook->apply_filters, wpml_tm_save_post, WPML_TM_Post_Actions->save_post_actions, WPML_TM_Action_Helper->add_translation_job, WPML_TM_Update_Translation_Data_Action->add_translation_job, WPML_Element_Translation_Package->save_package_to_job

Running the latest version of WP and WPML.

September 19, 2019 at 12:50 am #4600405

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for contacting the WPML Support Forum.

Could you please provide more information of the string? Which plugin is responsible for the string or is it part of the theme?

Is the issue connected to the Yoast SEO title?
If not, where does the string appear on Front-End? Please provide a link or screenshot.

Further, I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT

Please make a backup of site files and database before providing us access.
If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Kind regards
Andreas

September 19, 2019 at 2:41 pm #4606415

alexQ-2

Hi Andreas,

My main issue seems to be resolved now. After updating WPML to the latest version I was not able to translate any of the strings in 'String translations', apparently everything was fine but all the strings in secondary languages were in the default language (English). I solved it clicking on 'Recreate ST DB cache tables' in the troubleshooting page.

There's still a different issue that apparently doesn't have any impact on the website but is still present in my logs. When I create a page and add a translation, everything goes well but I see the next two PHP DB errors:

WordPress database error Unknown column 'wrap_tag' in 'field list' for query 
					SELECT id, name, value, wrap_tag, type, title
					FROM wp_icl_strings
					WHERE string_package_id=67
					ORDER BY location, id ASC made by edit_post, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, WPML_TM_Word_Count_Refresh_Hooks->refresh_post_word_count, WPML_TM_Word_Count_Single_Process->process, WPML_TM_Word_Count_Set_Package->process, WPML_ST_Package_Factory->create, WPML_Package->__construct, WPML_Package->init_from_array, WPML_Package->set_package_post_data, WPML_Package->update_strings_data, WPML_Package->get_package_strings
WordPress database error Unknown column 'field_wrap_tag' in 'field list' for query INSERT INTO `wp_icl_translate` (`job_id`, `content_id`, `field_type`, `field_wrap_tag`, `field_format`, `field_translate`, `field_data`, `field_data_translated`, `field_finished`) VALUES ('2360', '0', 'field-enable_ratings-0', '', 'base64', '0', 'MQ==', 'MQ==', '1') made by edit_post, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, WPML_Admin_Post_Actions->save_post_actions, WPML_Post_Translation->after_save_post, do_action('wpml_tm_save_post'), WP_Hook->do_action, WP_Hook->apply_filters, wpml_tm_save_post, WPML_TM_Post_Actions->save_post_actions, WPML_TM_Action_Helper->add_translation_job, WPML_TM_Update_Translation_Data_Action->add_translation_job, WPML_Element_Translation_Package->save_package_to_job

I can see in one of the WPML core files that there is a function (WPML_Upgrade_Add_Wrap_Column_To_Translate) that creates one of these columns in the DB. If I manually add the columns to the DB the error disappears though, but I should not be creating new columns into the DB. Any idea why does that happen?

Thank you.

September 19, 2019 at 3:37 pm #4606939

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

It might be that for some reason the table structure changed.

Could you please have a look at this ticket and try to run the SQL query mentioned there. Make sure to take a backup of your database first.

https://wpml.org/forums/topic/wordpress-database-error-after-updating-wpml-unknown-column-wrap_tag-in-fie/

If this will not solve the issue I would liek to take a closer look to your site and your DB.

Kind regards
Andreas

September 20, 2019 at 8:02 am #4610299

alexQ-2

Yes I did that and the PHP error is not in the logs anymore, just wondering why that happened.

Thanks for your help!

September 20, 2019 at 3:26 pm #4613355

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I am glad to hear that the issue has been fixed.

Somehow, it seems the value for one of the table elements had changed. Honestly, I am not aware of why this happened. There can be various reasons, like plugin incomatiblity, errors in our code (which I exclude here, as there have not been more cases with the current version of WPML) or even user errors while making an edit or running querries.

Please reach out to us if the issue appears again and we will need to investigate further.

Kind regards
Andreas

September 23, 2019 at 9:54 am #4622123

alexQ-2

My issue is resolved now. Thank you!