Skip Navigation

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

Problem:
The client reported issues with WPML on their WordPress site hosted on Kinsta, including a disconnected license and error messages indicating a 'Division by zero' in the WPML code. Additionally, the 'jobs' page within WordPress was not loading translation jobs correctly, displaying messages that jobs could not be loaded or that the Advanced Editor jobs synchronization had failed.

Solution:
We resolved the issue by running SQL queries to update the status of translation jobs in the 'icl_translation_status' table. First, we changed the status of jobs that were 'In Progress' (status 2) to 'Needs Update' (status 1) with the following query:

UPDATE `{wpdbPrefix}_icl_translation_status` SET `status` = 1 WHERE `status` = 2

Then, we set all remaining ongoing jobs to 'Finished' (status 10) using these queries:

UPDATE `{wpdbPrefix}_icl_translation_status` SET `status` = 10 WHERE `status` = 1;
UPDATE `{wpdbPrefix}_icl_translation_status` SET `status` = 10 WHERE `status` = 9;

After applying these fixes, we advised the client to go to WPML > Translation Management and resend any pages they wish to translate.

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. If you're still experiencing issues, we highly recommend checking the related 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 persists, please open a new support ticket with us.

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 8 replies, has 3 voices.

Last updated by Dražen 10 months, 3 weeks ago.

Assisted by: Long Nguyen.

Author Posts
February 2, 2024 at 8:09 am #15258097

williamV-12

Other strange behaviour seems to happen. The license seemed to be disconnected for a brief time and Kinsta, the platform hosting our WordPress site logged error messages from WPML that I'm pasting here:

2024/02/01 14:32:35 [error] 47976#47976: *27336 FastCGI sent in stderr: "PHP message: PHP Warning: Attempt to read property "element_id" on null in /www/ifcsn_953/public/wp-content/plugins/sitepress-multilingual-cms/classes/API/REST/jobs/class-wpml-tm-rest-jobs-view-model.php on line 187PHP message: PHP Fatal error: Uncaught DivisionByZeroError: Division by zero in /www/ifcsn_953/public/wp-content/plugins/sitepress-multilingual-cms/classes/API/REST/jobs/class-wpml-tm-rest-job-progress.php:41
Stack trace:
#0 /www/ifcsn_953/public/wp-content/plugins/sitepress-multilingual-cms/classes/API/REST/jobs/class-wpml-tm-rest-jobs-view-model.php(116): WPML_TM_Rest_Job_Progress->get(Object(WPML_TM_Post_Job_Entity))
#1 /www/ifcsn_953/public/wp-content/plugins/sitepress-multilingual-cms/classes/API/REST/jobs/class-wpml-tm-rest-jobs-view-model.php(66): WPML_TM_Rest_Jobs_View_Model->map_job(Object(WPML_TM_Post_Job_Entity), Object(WPML_TM_Jobs_Search_Params))
#2 /www/ifcsn_953/public/wp-content/plugins/sitepress-multilingual-cms/classes/API/REST/class-wpml-tm-rest-jobs.php(215): WPML_TM_Rest_Jobs_View_Model->build(Object(WPML_TM_Jobs_Collection), 119, Object(WPML_TM_Jobs_Search_Params))
#3 /www/ifcsn_953/public/wp-includes/rest-api/class-wp-rest-server.php(1193): WPML_TM_REST_Jobs->get_jobs(Objec" while reading response header from upstream, client: 192.109.159.95, server: env-ifcsn-ifcsnstaging.kinsta.cloud, request: "GET /wp-json/wpml/tm/v1/jobs/?limit=20&offset=0&sorting%5Bid%5D=desc&pageName=tm-jobs HTTP/2.0", upstream: "hidden link:", host: "env-ifcsn-ifcsnstaging.kinsta.cloud:57858", referrer: "hidden link"

If I click on the "job" page within WordPress, it says that jobs cannot be loaded. (See screenshot)

February 2, 2024 at 8:22 am #15258104

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi William,

Here is another ticket. The issue looks like this one https://wpml.org/forums/topic/started-attempt-to-download-xliff-file-the-process-did-not-finish-9/
Please follow the workaround in the summary and let me know how it goes.

Look forward to your reply.
Thanks

February 2, 2024 at 6:14 pm #15260736

williamV-12

Hi Long,

Using this I was able to get into the database. I opened the table they refer to and checked the field named status. All records have a value of 9 or 10. There are none that have a value of 2. See attached Screenshot.

Thanks!
Daniela

image.png
February 5, 2024 at 2:32 am #15264158

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

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 have a testing site where the issue is replicated. Your next reply is set to private to share the info.

❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup: https://wordpress.org/plugins/duplicator/
✙ I would need your permission to de-activate and re-activate Plugins and the Theme to change configurations on the site if needed. This is also a reason the backup is critical.

Look forward to your reply.
Thanks

February 6, 2024 at 1:45 am #15268688

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Some jobs have status 2 (In Progress) in the table "icl_translation_status". I fix the issue on your site with this SQL query:

UPDATE `{wpdbPrefix}_icl_translation_status` 
SET `status` = 1
WHERE `status` = 2

Please recheck the issue and let me know if it works.

February 6, 2024 at 11:27 am #15271028

williamV-12

Hi Long,

I tried again loading the jobs, there is improvement, in that jobs appear and the list has become longer, but I also received the error message: The Advanced Editor jobs synchronization has failed. See attached screenshot.

At one point, going to page 2, it also said that jobs failed to load.

The credentials I sent you for our database are still the same and I also haven't disabled your access to our instance of WordPress.

Thank you for looking into this some more.

Daniela

Screenshot 2024-02-06 at 12.18.47.png
February 7, 2024 at 2:17 am #15274234

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I can see that error message on the Jobs page. However, after reloading the page, I don't see it and the pagination works properly, it might be a temporary issue. Here is the screen record hidden link

You can also follow the suggestion steps here https://wpml.org/forums/topic/the-advanced-editor-jobs-synchronization-has-failed-4/#post-12430543
and see if it helps.

Look forward to your reply.
Thanks

February 7, 2024 at 11:20 am #15276238

williamV-12

Hi Long,

The page does display the jobs, but it also still gives the same error message. What's concerning is that one of the French pages that had already the translation complete now says "needs translation". See screenshot.

What's difficult is that I can't trust the website to keep the translation work that was done in the past.

Should I follow the last entry in the link you sent, suggested by Alejandro, that suggests deregistering and reregistering the site?

Thank you,
Daniela

Screenshot 2024-02-07 at 12.15.34.png
February 7, 2024 at 12:48 pm #15276669

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello Daniela,

Long is OFF today, so I have checked further your case and it seems the error message was caused by some still leftover of jobs, so I have set all other rest of ongoing jobs to finished via the next query:

UPDATE `DkzVpsfm_icl_translation_status` SET `status` = 10 WHERE `status` = 1;
15.49

UPDATE `DkzVpsfm_icl_translation_status` SET `status` = 10 WHERE `status` = 9;

You can go to WPML > Translation and send any other page you wish to translate.

Let us know how it goes and if any other doubts.

Regards,
Drazen