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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
- | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Sao_Paulo (GMT-03:00)
Tagged: Bug
This topic contains 8 replies, has 3 voices.
Last updated by Mateus Getulio 10 months, 3 weeks ago.
Assisted by: Mateus Getulio.
Author | Posts |
---|---|
May 16, 2024 at 7:56 pm #15637043 | |
jean-christopheV-3 |
I have this Error in the WPML translation queue page: Uncaught DivisionByZeroError. The error is in this file : class-wpml-tm-rest-job-progress.php on line 41. Code in question: $percentage = (int) ( count( $translated ) / count( $elements ) * 100 ); With this code, my translation queue page loads correctly: if( $totalCtn == 0){ $totalCtn = 1; } $percentage = (int) ( count( $translated ) / $totalCtn * 100 ); How did the error occur : Note : |
May 16, 2024 at 8:56 pm #15637129 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Could you please increase your WP Memory limit to 256M? 128M is the minimum required by WPML. PHP Memory Limit 1024M define('WP_MEMORY_LIMIT', '256M'); Paste it just before: / That's all, stop editing! Happy blogging. / Now, verify the current settings at WPML > Support > WordPress. Then complete the translation again. These settings can be limited directly by your hosting provider, so I recommend you contact and ask them to modify them directly. https://wpml.org/home/minimum-requirements/ If this will still not solve the issue, please let us know. Best regards |
May 21, 2024 at 11:58 am #15650273 | |
jean-christopheV-3 |
Hello, sorry for the delay, we had a long weekend. I am currently working localy, define('WP_MEMORY_LIMIT', '256M'); is already in my wp-config. I attached a screenshot of my site health status. In it, we can see that wp_memory_limit is at 256M. I also attached a screenshot from WPML -> Support. Thank you for the help, have a good day. |
May 21, 2024 at 8:23 pm #15652643 | |
Mateus Getulio Supporter
Languages: English (English ) Portuguese (Brazil) (Português ) Timezone: America/Sao_Paulo (GMT-03:00) |
Hello there, Can you please try to run the following SQL command to get those stuck jobs removed from the queue and give you access to the translation queue again? ❌ IMPORTANT: Please backup your database and website before proceeding ❌ UPDATE `wp_icl_translation_status` SET `status` = 10 WHERE `status` = 1; UPDATE `wp_icl_translation_status` SET `status` = 10 WHERE `status` = 2; UPDATE `wp_icl_translation_status` SET `status` = 10 WHERE `status` = 9; After running those commands, please try to send the pages/posts for translation again and check if it is working as expected. Thank you, |
May 23, 2024 at 12:28 pm #15662920 | |
jean-christopheV-3 |
Hello, the SQL command worked, I now have access to the translation without my temp fix. Do you know where the error come from so I don't reproduce it? And if it happen again I can just run the SQL command, nothing bad will happen to my content? Thanks for the help. |
May 23, 2024 at 1:35 pm #15663360 | |
jean-christopheV-3 |
The issue was my translator language pairs. Fixed it. But it seem that I can't translate my cart page. The string are displayed on the site in english even if the text is french in the cms. How can I modify this element (you can see it in the screenshot). Thanks! --------------------------------------------------------------------------------- Also, I have a second question. I don't know if it's me missing something or something else. Im trying to translate a string from the [string translation page]. It is currently in status "waiting for translator". I do not see the string in the [translations page]. I do see it in the [translation mangement page], in the tab JOBS. Is it me not understanding how to translate the string? Thanks again. |
May 23, 2024 at 4:54 pm #15664664 | |
Mateus Getulio Supporter
Languages: English (English ) Portuguese (Brazil) (Português ) Timezone: America/Sao_Paulo (GMT-03:00) |
Hello there, I'm glad to know that working on the language pairs fixed that issue. Regarding your previous reply, for some glitch in the system, a (few) translation(s) got stuck and didn't have its status properly updated. The SQL you ran only resets the status of the stuck translation jobs, but it doesn't cause any data loss. It is pretty rare for it to happen, it is highly likely that you won't face this issue ever again. If it reocurs, we can investigate it, looking for the culprit of the issue. But it should be fixed by now. Regarding the issue with the untranslated strings, can you please go to WPML -> String Translation, enable the option "Look for strings while pages are rendered" at the bottom of the screen and see if when this option is enabled, the issue still happens? If the strings are displayed properly with that option enabled, you can go ahead and disable it and try the following steps to try to fix it: - Make sure you have Woocommerce Multilingual enabled on your website If it still doesn't work, you can try to remove one of the strings in WPML -> String Translation, eg.: "Change address", temporarily re-enable the option "Look for strings while pages are rendered" and open that page in the front end where the strings are located. This will cause the string to be reinserted into String Translation. Translate it now and check if it gets the issue fixed. Thank you, please let me know. |
May 23, 2024 at 6:07 pm #15664818 | |
jean-christopheV-3 |
Hello, thanks for the reply. Still having trouble with the untranslated strings. When I activate [Look for strings while pages are rendered], I do not see any change on the front-end nor on the [string translation page]. When I regenerate the MO Files, I still see no change. Here is a screenshot of my string translation. String translation works fine for menu items, I don't know why it doesnt work there. I am using Astra FYI. Thank you. |
May 23, 2024 at 9:02 pm #15665250 | |
Mateus Getulio Supporter
Languages: English (English ) Portuguese (Brazil) (Português ) Timezone: America/Sao_Paulo (GMT-03:00) |
Hello, You mentioned that you're working locally, do you have a staging version that I can access to debug this? If so, I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. 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. Our Debugging Procedures I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site. Privacy and Security Policy We have strict policies regarding privacy and access to your information. Please see: **IMPORTANT** - Please make a backup of site files and database before providing us access. If the access to the site is not possible, I'd like your help creating a package of your website and sending it to us. Please use the plugin Duplicator(hidden link) to create a full copy of your website so we can take a look at it and see what's causing the issues you're experiecing. Please check our tutorial on how to create a Duplicator package here: https://wpml.org/faq/provide-supporters-copy-site/ If you come across problems while creating it, please feel free to ignore(exclude from the backup) both uploads and cache folders. I'm also enabling the proper field for your to share this copy, you'll see it on your next response. Alternatively, you may use any file sharing service that you prefer and share the link in the ticket(your next response is being marked as private, only you and I have access to it). Please, let me know if you need any additional details. |
The topic ‘[Closed] Error loading translation queue – Uncaught DivisionByZeroError’ is closed to new replies.