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 11 replies, has 2 voices.

Last updated by ryanW-5 1 year, 6 months ago.

Assigned support staff: Lauren.

Author Posts
November 12, 2018 at 4:21 am

ryanW-5

I am trying to "troubleshooting":
press all button, and when process
[assign translation status to duplicates] is error.

And I find that debug log will have the sql error message.

And I find that CPU is often too high, even if only one person is browsing the site.

I try to test when I close the all wpml plugin and the other addon plugin, the cpu can downgrade about 30~40% .

I don't know if it is related to the sql error, or is this normal?
thank you.

Debug log:

[30-Oct-2018 09:34:11 UTC] PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Tried to set status9 for falsy post_id N;' in /home/mosmotorcom/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/post-translation/class-wpml-post-status.php:145
Stack trace:
#0 /home/mosmotorcom/public_html/wp-content/plugins/sitepress-multilingual-cms/menu/troubleshooting.php(240): WPML_Post_Status->set_status(NULL, 9)
#1 /home/mosmotorcom/public_html/wp-admin/admin.php(253): include('/home/mosmotorc...')
#2 {main}
thrown in /home/mosmotorcom/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/post-translation/class-wpml-post-status.php on line 145

[30-Oct-2018 09:34:18 UTC] WordPress database error:Duplicate entry '67561-zh-hant' for key 'trid_lang'. By UPDATE `trf_icl_translations` SET `language_code` = 'zh-hant' WHERE `translation_id` = '69426' error from include('/plugins/sitepress-multilingual-cms/menu/troubleshooting.php'), TranslationManagement->add_missing_language_information, TranslationManagement->add_missing_language_to_posts, TranslationManagement->add_missing_language_to_post

[30-Oct-2018 09:34:18 UTC] WordPress database error:Duplicate entry '67562-zh-hant' for key 'trid_lang'. By UPDATE `trf_icl_translations` SET `language_code` = 'zh-hant' WHERE `translation_id` = '69427' error from include('/plugins/sitepress-multilingual-cms/menu/troubleshooting.php'), TranslationManagement->add_missing_language_information, TranslationManagement->add_missing_language_to_posts, TranslationManagement->add_missing_language_to_post

[30-Oct-2018 09:34:18 UTC] WordPress database error:Duplicate entry '67564-zh-hant' for key 'trid_lang'. By UPDATE `trf_icl_translations` SET `language_code` = 'zh-hant' WHERE `translation_id` = '69428' error from include('/plugins/sitepress-multilingual-cms/menu/troubleshooting.php'), TranslationManagement->add_missing_language_information, TranslationManagement->add_missing_language_to_posts, TranslationManagement->add_missing_language_to_post

[30-Oct-2018 09:34:24 UTC] WordPress database error:Duplicate entry '67563-zh-hant' for key 'trid_lang' from UPDATE `trf_icl_translations` SET `language_code` = 'zh-hant' WHERE `translation_id` = '69425' error from include('/plugins/sitepress-multilingual-cms/menu/troubleshooting.php'), TranslationManagement->add_missing_language_information, TranslationManagement->add_missing_language_to_posts, TranslationManagement->add_missing_language_to_post

I expected to see:
no debug log error message

November 13, 2018 at 3:42 pm #2903412

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. I'll be happy to help you with this.

It looks like there are some errors in your database. Please make a full backup of your database, and then access your database via phpmyadmin or using a plugin such as Adminer. Search in the icl_translations tables for the TRIDs mentioned in the errors (69425, 69426, 69427, 69428) and delete these rows. Then, delete or rename the error log and try again to run the troubleshooting steps. Are you still seeing errors in the debug log?

November 14, 2018 at 6:30 am #2905503

ryanW-5

hi~ I have delete the error (69425, 69426, 69427, 69428) .
But there is also error.

[14-Nov-2018 06:28:18 UTC] PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Tried to set status9 for falsy post_id N;' in /home/mosmotorcom/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/post-translation/class-wpml-post-status.php:145
Stack trace:
#0 /home/mosmotorcom/public_html/wp-content/plugins/sitepress-multilingual-cms/menu/troubleshooting.php(240): WPML_Post_Status->set_status(NULL, 9)
#1 /home/mosmotorcom/public_html/wp-admin/admin.php(253): include('/home/mosmotorc...')
#2 {main}
thrown in /home/mosmotorcom/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/post-translation/class-wpml-post-status.php on line 145
[14-Nov-2018 06:28:22 UTC] PHP Notice: Undefined index: path in /home/mosmotorcom/public_html/wp-content/plugins/heartbeat-control/heartbeat.php on line 79

November 14, 2018 at 1:05 pm #2906408

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thanks for testing that for me. I found a ticket with the same error that you are now seeing. Please see: https://wpml.org/forums/topic/error-when-i-press-assign-translation-status-to-duplicate-content/

The solution here was to
1) Log in to your PHPMyAdmin account
2) Choose your database and backup it. Then choose *icl_translations* table
3) Sort the *element_id* field(just click the column header)
4) You can find many records with *NULL* value for *element_id* field
5) Delete all those records
6) Then make sure you are getting the expected result or not

Can you please test this and let me know if it resolves the issue for you?

November 15, 2018 at 3:31 am #2908686

ryanW-5

HI~
thank you, it resolve my problem.

And I find a new problem, when [clear wpml cache]
the debug log will show that message:

[15-Nov-2018 03:27:19 UTC] PHP Warning: posix_getpwuid() has been disabled for security reasons in /home/mosmotorcom/public_html/wp-admin/includes/class-wp-filesystem-direct.php on line 199

November 15, 2018 at 12:51 pm #2910152

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

As the original issue is resolved may I kindly ask you please to open a new ticket for this question?
This will also help other users with similar problems find solutions when searching the forum as well as we avoid mixing lots of questions in one ticket.

Thank you for your understanding.

November 16, 2018 at 9:26 am #2912895

ryanW-5

Yes, I already open a new ticket, thank you for your help.

November 16, 2018 at 9:29 am #2912904

ryanW-5

I find that I can't edit the above message, the page will empty like hidden link

November 16, 2018 at 3:16 pm #2914144

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

I am able to edit a reply without that blank screen. Which message are you trying to edit? Is there something you would like me to remove for you?

November 19, 2018 at 3:25 am #2918350

ryanW-5

I just want to fix this word [alreay], and find this problem.

November 19, 2018 at 6:16 pm #2920762

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

I have fixed the typo. You can mark this ticket as resolved and continue on the new ticket that you created. Thanks!

November 21, 2018 at 8:20 am #2925666

ryanW-5

My issue is resolved now. Thank you!