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.

Tagged: 

This topic contains 14 replies, has 2 voices.

Last updated by Bigul 1 year, 10 months ago.

Assisted by: Bigul.

Author Posts
August 2, 2023 at 2:50 am #14138375

taivoJ

Hello,

I have critical error in my website when I'm trying to translate via WooCommerce Multilingual & Multicurrency. When I'm translating via default page everything is ok. Also when I go WPML > Translations I get same error page.

August 2, 2023 at 7:46 am #14139675

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve the issue.

This may be a compatibility issue. Please share with us the WordPress debug.log(not WPML debug information) for collecting more details on this. Refer to the following pages for instructions

https://wpml.org/documentation/support/debugging-wpml/

https://wordpress.org/documentation/article/debugging-in-wordpress/

To enable the WordPress Debug log, open your wp-config.php file of site root and look for define('WP_DEBUG', false);. Change it to:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
 
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
 
// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

In this case, the errors will be saved to a debug.log log file inside the */wp-content/* directory. Please do the steps to reproduce the bug and check if you are getting any errors or warnings related to WPML in the log file.

If you can paste your debug.log to http://pastebin.com/index.php and provide me that link it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess of discussion).

--
Thanks!

Bigul

August 3, 2023 at 12:21 am #14145141

taivoJ

Hello Bigul.

This website not opening: http://pastebin.com/index.php. WPML log file is not showing any errors. WP debugging info is here:

[02-Aug-2023 02:26:23 UTC] PHP Fatal error:  Uncaught InvalidArgumentException: item should be a Collection or an array or an object in /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Obj.php:112
Stack trace:
#0 [internal function]: WPML\FP\Obj::WPML\FP\{closure}(NULL, 'code', false)
#1 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array(Object(Closure), Array)
#2 [internal function]: WPML\FP\Obj::WPML\FP\{closure}(NULL, 'code', false)
#3 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array(Object(Closure), Array)
#4 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Obj.php(90): WPML\FP\Obj::__callStatic('propOr', Array)
#5 [internal function]: WPML\FP\Obj::WPML\FP\{closure}('code', false)
#6 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array(Object(Closure), Array)
#7 [internal function]: WPML\FP\Obj::WPML\FP\{closure}('code', false)
#8 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array(Object(Closure), Array)
#9 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/menu/jobs-list/class-wpml-tm-jobs-list-script-data.php(191): WPML\FP\Obj::__callStatic('prop', Array)
#10 [internal function]: WPML_TM_Jobs_List_Script_Data->{closure}(false)
#11 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(50): call_user_func_array(Object(Closure), Array)
#12 [internal function]: WPML\FP\{closure}('au')
#13 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(321): call_user_func_array(Object(Closure), Array)
#14 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/menu/jobs-list/class-wpml-tm-jobs-list-script-data.php(176): WPML\FP\Fns::WPML\FP\{closure}('au')
#15 [internal function]: WPML_TM_Jobs_List_Script_Data->{closure}(Array, 'au')
#16 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Collection.php(603): array_map(Object(Closure), Array, Array)
#17 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/menu/jobs-list/class-wpml-tm-jobs-list-script-data.php(182): WPML\Collect\Support\Collection->map(Object(Closure))
#18 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/menu/jobs-list/class-wpml-tm-jobs-list-script-data.php(137): WPML_TM_Jobs_List_Script_Data->buildLanguagePairs(Array)
#19 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/jobs/Loader.php(24): WPML_TM_Jobs_List_Script_Data->get()
#20 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(207): WPML\TM\Jobs\Loader->getData(Array)
#21 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(257): WPML\FP\Right->map(Array)
#22 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(24): WPML\FP\Right->chain(Array)
#23 /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wp/classes/Hooks.php(50): WPML\FP\Promise->resolve(Object(WPML\FP\Right))
#24 /home/sites/25a/c/cf283c6781/public_html/wp-includes/class-wp-hook.php(308): WPML\LIB\WP\Hooks::WPML\LIB\WP\{closure}('')
#25 /home/sites/25a/c/cf283c6781/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#26 /home/sites/25a/c/cf283c6781/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#27 /home/sites/25a/c/cf283c6781/public_html/wp-settings.php(645): do_action('wp_loaded')
#28 /home/sites/25a/c/cf283c6781/public_html/wp-config.php(96): require_once('/home/sites/25a...')
#29 /home/sites/25a/c/cf283c6781/public_html/wp-load.php(50): require_once('/home/sites/25a...')
#30 /home/sites/25a/c/cf283c6781/public_html/wp-admin/admin.php(34): require_once('/home/sites/25a...')
#31 {main}
  thrown in /home/sites/25a/c/cf283c6781/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Obj.php on line 112
August 3, 2023 at 5:13 am #14145557

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the updates. We had the same bug in the past and it is fixed already. Please check the following URL for more details.

https://wpml.org/errata/uncaught-invalidargumentexception-item-should-be-a-collection-or-an-array-or-an-object/

So this may be a compatibility issue. Have you removed any languages in the past?

Please tries the following troubleshooting steps after a full site backup{mandatory} and make sure the issue exists or not.

1) Go to WPML>>Support page, click on the Troubleshooting link (blue link in the middle of the page)

2) On the Troubleshooting page, please click on the following options in the *Clean up* section. Wait for confirmation of processing after each one.

- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Fix WPML tables collation
- Assign translation status to duplicated content
- Fix terms count
- Fix post type assignment
- Cleanup and optimize string tables

--
Thanks!

Bigul

August 4, 2023 at 1:17 am #14152355

taivoJ

Hello Bigul,

I've taken all the necessary troubleshooting steps, but the issue remains unresolved.

August 4, 2023 at 6:06 am #14152797

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the updates. Just to make sure, does it happens with Product posts only? A couple of requests for tracking this.

1) Please fill the private details fields after a full site backup. I would like to access the admin area of your site for further checking. Refer to the following links for more details about our private information sharing policies.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

hidden link

2) Please allow me to make a duplicator copy of your site using the Duplicator plugin(https://wordpress.org/plugins/duplicator/) for debugging the issue on my local server. So we can troubleshoot the issue without affecting your live site.

--
Thanks!

Bigul

August 4, 2023 at 3:34 pm #14155761

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the login information. I made a copy of the site now, we will debug it further locally and get back to you as early as possible. Please wait.

--
Thanks!

Bigul

August 7, 2023 at 5:36 pm #14165751

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

I had a few rounds of testing in my local copy after upgrading to WPML(4.6.5). But not able to reproduce the issue exactly.

So one request. Please upgrade to the latest version of WPML(4.6.5) after a full site backup{mandatory} and make sure the issue is existing or not.

If the bug remains, please let me know the exact steps to reproduce the bug.

--
Thanks!

Bigul

August 8, 2023 at 10:13 am #14168333

taivoJ

Hello Bigul.

After the update, there seems to be no difference. When I navigate to WooCommerce > WooCommerce Multilingual & Multicurrency > Products and attempt to duplicate the English page for "Microsoft Windows Server Standard 2019" into Philippines English, I encounter an error. This issue also arises with any .ph product that hasn't been translated.

Error.jpg
August 8, 2023 at 5:07 pm #14171603

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the feedback. I made a new copy of the site, will test it further locally, and get back to you soon. Please wait.

--
Thanks!

Bigul

August 9, 2023 at 11:29 am #14175363

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

I had another round of testing in my local copy and also on your site. But unable to reproduce the issue exactly. Please check the following screencast for more details.

hidden link

So please log in as a different user and check whether the bug is reproducible or not.

Also, it is only happening while translating or duplicating a product to the Philippines language, am I correct?

--
Thanks!

Bigul

August 10, 2023 at 12:13 am #14178777

taivoJ

Hello Mr Bigul.

I signed in using another account, and now everything is functioning properly. How did this happen, and what might have been the root of the issue?

Should I remove my old account and create a new one?

August 10, 2023 at 6:21 am #14179203

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the feedback. This looks like an exception. We had an almost similar bug in the past and it is fixed by updating the database. Please check the following ticket for more details.

https://wpml.org/forums/topic/translation-jobs-showing-error/

This requires escalation to our developers. One more request. Please share the Username of the user who had this fatal error. I am enabling the private option for the next reply.

--
Thanks!

Bigul

August 10, 2023 at 2:39 pm #14183459

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Thank you for the updates. I have shared the details with our team for an expert opinion. We will get back to you as soon as possible. Please wait.

--
Thanks!

Bigul

August 11, 2023 at 9:23 am #14187345

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

Please try the following steps after a site backup and make sure you are getting the expected results or not.

1) Visit WPML>>Translation Management>>Translators
2) Remove the current Translator
3) Refresh the page
4) Add the user as Translator again
5) Try to translate the Product post into the Philippines language

--
Thanks!

Bigul