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 topic contains 8 replies, has 2 voices.

Last updated by Bigul 7 months, 2 weeks ago.

Assigned support staff: Bigul.

Author Posts
February 20, 2019 at 5:09 pm #3223165

Will

I am trying to: Save a page

Link to a page where the issue can be seen: hidden link

I expected to see: The ability to update the page?

Instead, I got: An infinite loop of duplicating pages where I have to reboot the server to get it to stop.

Basically, when saving this page, it never finishes and then infinitely creates duplicate pages. We've done some research into it today, and found the following error in the error log.

WordPress database error Duplicate entry '16670-es' for key 'trid_lang' for query UPDATE `prs_icl_translations` SET `trid` = '16670', `language_code` = 'es', `source_language_code` = 'en' WHERE `element_type` = 'post_boat' AND `element_id` = '48888' 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, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->run_wpml_actions, SitePress->set_element_language_details, WPML_Set_Language->set, WPML_Set_Language->change_translation_of

Which just gets worse and worse the longer the job continues. We've followed the troubleshooting and that's not fixed the issue.

It's also worth noting that this is only appearing on certain pages, we've found that deleting the page and recreating it exactly the same fixes the issue, however we can't be sure which pages are actually causing the problem so can't implement this fix across the site (without creating every single page just in case). The closest we've gotten, is that the page I've sent across has a German translation, and then a Spanish and Swedish translation awaiting translation. However the element_id is empty in the database for this translation.

Let me know if you need any further information from us.

Cheers!

Ben

February 21, 2019 at 9:10 am #3225864

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

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

Please try the following steps after a full site backup and make sure the issue is existing or not.

1) Log into your database.
2) Search for the "wp_icl_translations" table(May the table prefix will be different in your case)
3) Search for the record that has "trid_lang" with the "16670-es" value.
4) Delete the record
5) Deactivate WPML Core plugin
6) Activate WPML again

--
Thanks!

Bigul

February 21, 2019 at 5:33 pm #3229246

Will

Hi Bigul,

We're aware of how to fix it on an individual basis, but we need to know why it's doing it in the first place so we can be sure that we've caught all of the pages that would cause the infinite looping.

Is this an old bug that's since been fixed and only affects old content? If so - is there a way of finding out which pages are affected? So that we can perform the fix as above on them all?

Cheers,

Ben

February 22, 2019 at 1:10 pm #3232466

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Ben,

Thank you for the feedback. I have forwarded the details to our second tier team for the expert opinion and waiting for their feedback now. We will get back to you as soon as possible. Please wait.

May it requires further debugging. So please fill the private details fields after a full site backup. I would like to access the admin area of your site for further checking. Please check the following links for more details about our private information sharing policies.

hidden link

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Also please allow me to make a duplicator copy of your site using the Duplicator plugin(https://wordpress.org/plugins/duplicator/) for debugging the issue on my local server.

--
Thanks!

Bigul

February 25, 2019 at 5:07 pm #3241313

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Ben,

Thank you for the login information. Second tier team has requested for a detailed cross-checking.

So I made a Duplicator copy of your site now. Will debug the issue with the help of our team and get back to you soon. Please wait.

--
Thanks!

Bigul

February 26, 2019 at 1:55 pm #3245231

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Ben,

For your updates, I can reproduce the issue on my local server with minimal setup. It is showing the following errors for me serval times.

[26-Feb-2019 13:01:21 UTC] WordPress database error Column 'post_id' cannot be null for query INSERT INTO `prs_postmeta` (`post_id`, `meta_key`, `meta_value`) VALUES (NULL, 'boat_videos_0_video_source', ") 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, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->run_wpml_actions, WPML_Post_Duplication->duplicate_custom_fields

[26-Feb-2019 13:01:23 UTC] WordPress database error Duplicate entry '16670-sv' for key 'trid_lang' for query UPDATE `prs_icl_translations` SET `trid` = '16670', `language_code` = 'sv', `source_language_code` = 'en' WHERE `element_type` = 'post_boat' AND `element_id` = '49396' 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, WPML_Post_Synchronization->sync_with_duplicates, SitePress->make_duplicate, WPML_Post_Duplication->make_duplicate, WPML_Post_Duplication->run_wpml_actions, SitePress->set_element_language_details, WPML_Set_Language->set, WPML_Set_Language->change_translation_of

The result is the same after the initial debugging steps. Therefore I have shared the details with the second tier and waiting for their feedback.

Please wait. We will get back to you soon.

--
Thanks!

Bigul

March 4, 2019 at 11:32 am #3268343

Will

Hi Bigul,

Any update on this? It's becoming quite a pressing issue for out client so we need to go back to them with an update.

Cheers,

March 4, 2019 at 3:54 pm #3269754

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Ben,

For your kind updates, the bug is existing after the primary debugging procedures and we are not able to reproduce the issue in a fresh installation. Therefore the issue is escalated to our second tier team for further debugging. We will get back to you as early as possible. Please wait.

--
Thanks!

Bigul

March 6, 2019 at 6:29 pm #3280923

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Ben,

For your kind updates, our second tier team has traced the reason for the issue. It is happening because of some duplicated data in the Database. Removing the Duplicated values has fixed the issue in our local copies.

Please try the following steps after a full site backup and let me know your feedback. Check the attached images for more details.

1) Login to PHPMyAdmin
2) Run the following query
3) DELETE FROM `wp_postmeta`WHERE `meta_value` = '35627' (Table prefix will be differ in your case). There are more 1200 duplicated recorded for this.
4) SELECT * FROM `wp_icl_translations` WHERE `element_type` LIKE 'post_boat' ORDER BY `wp_icl_translations`.`element_id` ASC(Table prefix will be differ in your case)
5) Delete all the entry with *NULL* value for *element_id*. It should not be NULL.

The posts table(*wp_posts*) contains MULTIPLE pages that are duplicate with the name: "Princess X95". So we have a suggestion here that please removes the unnecessary posts and do not remove the proper entries.

--
Thanks!

Bigul