Skip Navigation

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 3 replies, has 1 voice.

Last updated by paulT-50 1 month, 1 week ago.

Assisted by: Otto.

Author Posts
May 1, 2025 at 3:14 pm #16986841

paulT-50

Background of the issue:
I was trying to view a list of online active jobs on my website. You closed the ticket, which is not ideal since we don't work on the website every day. The issue can be seen at this link: hidden link.

Symptoms:
Jobs could not be loaded.

Questions:
I found out why, the database was corrupted because a Post set to have its excerpt translated had a blank entry and as per debug
"[01-May-2025 13:42:04 UTC] PHP Fatal error: Uncaught DivisionByZeroError: Division by zero in D:www.albioneco.co.ukdev_htmlwp-contentpluginssitepress-multilingual-cmsclassesAPIRESTjobsclass-wpml-tm-rest-job-progress.php:41"
It looks like your code is trying to translate something which isn't there and fails

May 2, 2025 at 3:21 pm #16990153

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

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

Hi,

This likely indicates that a translation job has a total = 0, causing WPML to attempt a division by zero when calculating progress.

Can you run this SQL to confirm that WPML tables have proper auto-increment on ID fields?

SHOW CREATE TABLE wp_icl_translation_jobs;
SHOW CREATE TABLE wp_icl_translation_status;
SHOW CREATE TABLE wp_icl_translations;

etc.

Look for AUTO_INCREMENT on fields like job_id, id, etc.

Let us know what you find and we can assist further if needed.

check this for icl tables.jpg
May 6, 2025 at 8:47 am #17000296

paulT-50

`wp_icl_translation_status`
rid Primary bigint(20) No None AUTO_INCREMENT

`wp_icl_translate_job` SHOW CREATE TABLE wp_icl_translation_jobs; doesn't exist
job_id Primary bigint(20) UNSIGNED No None AUTO_INCREMENT

`wp_icl_translations`
translation_id Primary bigint(20) No None AUTO_INCREMENT

I still think it has more to do with the fact that the item it was trying to translate was empty ""
Until we added an excerpt - see attached image the jobs list crashed
hidden link

hidden link

Screenshot 2025-05-06 094159.png
May 6, 2025 at 3:27 pm #17002633

Otto
WPML Supporter since 09/2015

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks.

Let me summarize the issue to check if I got it properly:

The Translation Jobs screen crashes with “Jobs could not be loaded”.
Debug log shows PHP Fatal error – DivisionByZeroError in class‑wpml‑tm‑rest‑job‑progress.php:41.
Investigation reveals a post whose excerpt was empty; its translation status row caused WPML to divide by zero, and the missing wp_icl_translation_jobs table rows left the queue in an inconsistent state.

Is that correct? If not, can you please elaborate?

If my understanding of the issue is correct, please try the following:
• Backup the DB.
• In WPML → Support → Troubleshooting, run:
• “Synchronize local job IDs with ATE”
• “Synchronize translators and translation managers with ATE”
• In phpMyAdmin run:

UPDATE wp_icl_translation_status
SET status = 1
WHERE status = 2;

• Refresh WPML → Translation Management → Jobs.

If this does not work:
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.

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” or "All in One WP Migration" 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.

**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.

Best Regards,
Otto

May 13, 2025 at 12:45 pm #17027627

paulT-50

we have solved our problem with the empty field - this ticket was notifying you of how it the empty field error occurred so you could catch it in future