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.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

Tagged: 

This topic contains 12 replies, has 2 voices.

Last updated by Andreas W. 1 year ago.

Assisted by: Andreas W..

Author Posts
March 9, 2024 at 11:22 am #15391332

issamR-2

Tell us what you are trying to do?
Translate woodmart layout for products
Is there any documentation that you are following?
woodmart theme documentation

What is the link to your site?
gtcksa.com

In this case, WordPress caught an error with one of your plugins, WPML Multilingual CMS.

When seeking help with this issue, you may be asked for some of the following information:
WordPress version 6.4.3
Active theme: Woodmart Child (version 1.0.0)
Current plugin: WPML Multilingual CMS (version 4.6.9)
PHP version 8.2.16

Error Details
=============
An error of type E_ERROR was caused in line 42 of the file /home/1175740.cloudwaysapps.com/hczmssqxht/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translation-batch/class-wpml-tm-translation-batch-element.php. Error message: Uncaught InvalidArgumentException: Source lang has to be not empty string in /home/1175740.cloudwaysapps.com/hczmssqxht/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/translation-batch/class-wpml-tm-translation-batch-element.php:42
Stack trace:
#0 /home/1175740.cloudwaysapps.com/hczmssqxht/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/class-wpml-translation-job-factory.php(101): WPML_TM_Translation_Batch_Element->__construct()
#1 /home/1175740.cloudwaysapps.com/hczmssqxht/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/jobs/Manual.php(164): WPML_Translation_Job_Factory->create_local_job()
#2 /home/1175740.cloudwaysapps.com/hczmssqxht/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/jobs/Manual.php(43): WPML\TM\Jobs\Manual->createLocalJob()
#3 /home/1175740.cloudwaysapps.com/hczmssqxht/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(207): WPML\TM\Jobs\Manual->createOrReuse()
#4 /home/1175740.cloudwaysapps.com/hczmssqxht/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/editor/Editor.php(92): WPML\FP\Right->map()
#5 /home/1175740.cloudwaysapps.com/hczmssqxht/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/menu/translation-queue/class-wpml-translations-queue.php(52): WPML\TM\Editor\Editor->open()
#6 /home/1175740.cloudwaysapps.com/hczmssqxht/public_html/wp-includes/class-wp-hook.php(324): WPML_Translations_Queue->load()
#7 /home/1175740.cloudwaysapps.com/hczmssqxht/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#8 /home/1175740.cloudwaysapps.com/hczmssqxht/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#9 /home/1175740.cloudwaysapps.com/hczmssqxht/public_html/wp-admin/includes/class-wp-screen.php(424): do_action()
#10 /home/1175740.cloudwaysapps.com/hczmssqxht/public_html/wp-admin/includes/screen.php(243): WP_Screen->set_current_screen()
#11 /home/1175740.cloudwaysapps.com/hczmssqxht/public_html/wp-admin/admin.php(212): set_current_screen()
#12 {main}
thrown

March 9, 2024 at 1:37 pm #15391490

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

The error appears to relate to a translation job on WPML > Translation Management.

The error says:
Source lang has to be not empty

It looks as if you had jobs in progress while a language was deactivated inside the WPML language settings and WPML can no longer find the source language of this content.

Please revise WPML > Translation Management > Jobs and revise if there are jobs that might need to be canceled.

If this will not solve the issue, try to go to WPML > Support > Troubleshooting and run the options "Synchronize local job IDs with ATE jobs", "Synchronize translators and translation managers with ATE" and "Set language information".

If this will not solve the issue, please let us know.

Best regards
Andreas

March 9, 2024 at 2:45 pm #15391549

issamR-2

hello Andreas and thanks for the reply

i did the Synchronize but still something is wrong, kindly check the images

thank you

Screen Shot 2024-03-09 at 5.42.53 PM.png
Screen Shot 2024-03-09 at 5.42.52 PM.png
March 9, 2024 at 2:50 pm #15391579

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

This looks like an issue between your site and our system.

I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further.

You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it.

IMPORTANT
Please be sure to make a backup copy of the website and database before allowing us access.
If you can't see the wp-admin / FTP fields, your post and website credentials are set as PUBLIC. DO NOT publish the data unless you see the required wp-admin / FTP fields.

The private response form looks like this:
hidden link

Next time you reply, click "I still need assistance."

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form.

March 9, 2024 at 3:32 pm #15391611

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

The provided username appears not to be registered on this site.

Please correct the previously provided information inside the private message above and leave a comment on this ticket once you are done with this task.

March 9, 2024 at 3:32 pm #15391616

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Nevermind, please ignore my last message, I was able to log in on a second attempt.

March 9, 2024 at 3:37 pm #15391627

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

The Woodmart Layouts were not set to "Translatable
only show translated items" inside the WPML Settings.

You used "Translatable - use translation if available or fallback to default language" which appears not to work for templates.

Please test again now and let me know if the error occurs again.

March 9, 2024 at 4:26 pm #15391697

issamR-2

hello Andreas
i'm still having the same issue, the issue accrues when i try to edit the translated layout using elementor.

March 9, 2024 at 5:00 pm #15391728

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

I will have another look into this.

A few questions:

I saw you had two layouts, both saved as drafts.

One used the WPML Translation Editor for translation, and the other one used the WordPress Editor for translation.

Did you have an issue with creating a translation with the WPML Translation Editor?

Which of both layouts are you going to use on the site? I would suggest you use only one layout, as both are using the same display conditions. Please delete the layout that you are not going to use.

March 9, 2024 at 5:16 pm #15391748

issamR-2

i kept one layout, the english version works fine but when i try to edit the translated layout in elemetor an error accures

please check the video in the below link
hidden link

March 9, 2024 at 6:09 pm #15391800

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

There was a translation job for one of those templates in progress on WPML > Translation Management.

I have canceled this job now.

Further, I did not see any issue with translating the currently used template manually.

In case the error will occur again, please let us know.

March 9, 2024 at 6:51 pm #15391856

issamR-2

don't know what's happening but the problem is still there! i have downgraded to php 8.1 still the same issue.

i have the debug log for you to look at maybe it could help
hidden link

thank you.

March 12, 2024 at 1:56 pm #15399879

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Could you please confirm if translating the template manually could solve the issue?

1) Go to WPML > Translation Management > Jobs and cancel the job(s) for your template.

2) Go to the original template on the WordPress Editor and set inside the right sidebar "WordPress Editor" as the translation method.

3) Now, translate your template with the WordPress Editor.

Guide:
https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/

About the debug.log:

Regarding WPML, I only see "PHP Deprecated" messages that are not errors that currently harm your site. They only let the developers know that some specifically used functions will change how they work in a future version of PHP.

The topic ‘[Closed] Woodmart layout and some products error’ is closed to new replies.