Skip to content Skip to sidebar

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

Problem:
The client was experiencing issues with WPML's automatic translation feature, where the process was getting stuck at 'Calculating' and not proceeding. The PHP logs showed a fatal error related to a function call on a boolean value.
Solution:
We recommended the following steps:
1. Create a backup of the website.
2. Navigate to WordPress Dashboard > WPML > Support > Troubleshooting.
3. Click the buttons shown in the screenshot provided in sequence and wait for each to finish: https://wpml.org/wp-content/uploads/2020/10/7206941-buttons.png
If the issue persists, we suggested providing temporary access (wp-admin and FTP) to the site for further investigation, ensuring all privacy and security measures are followed as outlined in our support policy: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Please note that this solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/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 at WPML support forum.

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 1 reply, has 2 voices.

Last updated by Mateus Getulio 1 year, 2 months ago.

Assisted by: Mateus Getulio.

Author Posts
May 14, 2024 at 3:34 pm #15626322

Justin Channell

We have been struggling to get the Automatic translation to run fully through our website (our first translation run)

It kept on getting stuck at certain points and is now stuck on "Calculating" and not proceeding any further. When it got stuck, we paused the automated translations and cleared the WPML cache and it seemed to progress slightly then get stuck again.

Our PHP logs indicate a consistent error:

PHP Fatal error: Uncaught Error: Call to a member function get_source_language_code() on bool in /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/inc/functions-load-tm.php:501#012Stack trace:#012#0 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/Hooks/class-wpml-tm-ate-jobs-actions.php(153): wpml_tm_create_ATE_job_creation_model(1895, true)#012#1 [internal function]: WPML_TM_ATE_Jobs_Actions->{closure}(1895, 0)#012#2 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(164): array_map(Object(Closure), Array, Array)#012#3 [internal function]: WPML\FP\Fns::WPML\FP\{closure}(Object(Closure), Array)#012#4 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array(Object(Closure), Array)#012#5 [internal function]: WPML\FP\Fns::WPML\FP\{closure}(Object(Closure), Array)#012#6 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array(Object(Closure), Array)#012#7 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/Hooks/class-wpml-tm-ate-jobs-actions.php(152): WPML\FP\Fns::__callStatic('map', Array)#012#8 /nas/content/live/termlyv3/wp-includes/class-wp-hook.php(324): WPML_TM_ATE_Jobs_Actions->added_translation_jobs(Array, 3, Object(WPML_TM_Translation_Batch))#012#9 /nas/content/live/termlyv3/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)#012#10 /nas/content/live/termlyv3/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#012#11 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php(1478): do_action('wpml_added_tran...', Array, 3, Object(WPML_TM_Translation_Batch))#012#12 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/classes/automatic-translation/Actions.php(221): TranslationManagement->send_jobs(Object(WPML_TM_Translation_Batch), 'post', 3)#012#13 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/TranslateEverything.php(97): WPML\TM\AutomaticTranslation\Actions\Actions->createNewTranslationJobs('en', Array)#012#14 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/TranslateEverything.php(58): WPML\TM\ATE\TranslateEverything->translateEverything(Object(WPML\TM\AutomaticTranslation\Actions\Actions))#012#15 [internal function]: WPML\TM\ATE\TranslateEverything->run(Object(WPML\Collect\Support\Collection), Object(WPML\TM\AutomaticTranslation\Actions\Actions))#012#16 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/auryn/lib/Executable.php(42): ReflectionMethod->invokeArgs(Object(WPML\TM\ATE\TranslateEverything), Array)#012#17 [internal function]: WPML\Auryn\Executable->__invoke(Object(WPML\Collect\Support\Collection), Object(WPML\TM\AutomaticTranslation\Actions\Actions))#012#18 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/auryn/lib/Injector.php(641): call_user_func_array(Array, Array)#012#19 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/classes/container/class-wpml-container.php(110): WPML\Auryn\Injector->execute(Array, Array)#012#20 [internal function]: WPML\Container\Container::execute(Array, Array)#012#21 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array(Array, Array)#012#22 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Maybe.php(106): WPML\FP\{closure}(Array)#012#23 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/classes/ajax/Factory.php(38): WPML\FP\Just->map(Object(Closure))#012#24 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(207): WPML\Ajax\Factory->WPML\Ajax\{closure}(Object(WPML\Collect\Support\Collection))#012#25 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(257): WPML\FP\Right->map(Object(Closure))#012#26 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(24): WPML\FP\Right->chain(Object(Closure))#012#27 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(30): WPML\FP\Promise->resolve(Object(WPML\FP\Right))#012#28 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(30): WPML\FP\Promise->resolve(Object(WPML\FP\Right))#012#29 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(30): WPML\FP\Promise->resolve(Object(WPML\FP\Right))#012#30 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(30): WPML\FP\Promise->resolve(Object(WPML\FP\Right))#012#31 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(30): WPML\FP\Promise->resolve(Object(WPML\FP\Right))#012#32 /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wp/classes/Hooks.php(50): WPML\FP\Promise->resolve(Object(WPML\FP\Right))#012#33 /nas/content/live/termlyv3/wp-includes/class-wp-hook.php(324): WPML\LIB\WP\Hooks::WPML\LIB\WP\{closure}('')#012#34 /nas/content/live/termlyv3/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)#012#35 /nas/content/live/termlyv3/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#012#36 /nas/content/live/termlyv3/wp-admin/admin-ajax.php(192): do_action('wp_ajax_wpml_ac...')#012#37 {main}#012 thrown in /nas/content/live/termlyv3/wp-content/plugins/sitepress-multilingual-cms/inc/functions-load-tm.php on line 501

Please can you assist

Screenshot 2024-05-14 173412.png
May 14, 2024 at 8:19 pm #15626992

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Would you please follow the steps below?

- IMPORTANT STEP! Create a backup of your website.
- Go to "WordPress Dashboard > WPML > Support > Troubleshooting (link)".
- Click the buttons annotated in the screenshot below one by one and wait for each button process to finish:
https://wpml.org/wp-content/uploads/2020/10/7206941-buttons.png

If the problem persists, 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:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**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. If you do not, please ask me to enable the private box. The private box looks like this: hidden link

Please, let me know if you need any additional details. Have a nice day.

May 15, 2024 at 11:45 am #15629961

Justin Channell

Looks to be resolved, thank you Mateus.

We have to take extra steps as the automated translations said they were done, but still have posts and pages that weren't translated and were "Waiting for Translation".

We followed the steps in this thread: https://wpml.org/forums/topic/translate-everything-option-translations-stuck-at-waiting-for-translation-2/

"Please go to WPML > Settings > switch to use Translate Some mode, go to WPML → Translation Management, and click the Jobs tab. Cancel the stuck jobs.

Go to WPML > Support > Troubleshooting > Synchronize local job IDs with ATE

Switch back to Translate Everything mode and go to Translation Management, check if the pages are translating or if needed select them here and click at the bottom Translate button."