[Resolved] Critical error caused by WPML Translation Queue
This thread is resolved. Here is a description of the problem and solution.
Problem: If you're experiencing a critical error message like this InvalidArgumentException: item should be a Collection or an array or an object in /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Obj.php:112, it might be due to an incomplete setup of the Admin profile, particularly if the First Name, Last Name, or Email fields are not correctly filled out. Solution: 1. Go to Users > Your Profile and ensure that your First Name and Last Name are correctly entered. 2. Visit WPML > Translation Management > Translators. 3. If you have added yourself as a translator, remove your profile and then re-add it. If you haven't set up a translator profile yet, you can leave it as is.
After following these steps, if the issue persists or the solution doesn't seem relevant, please open a new support ticket with us, and we'll be glad to assist you further.
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.
I have a critical error message when I click WPML --> Translations.
Error details are below:
When seeking help with this issue, you may be asked for some of the following information:
WordPress version 6.4.1
Active theme: Hello Elementor (version 2.9.0) Current plugin: WPML Multilingual CMS (version 4.6.8) PHP version 8.2.7
Error Details
=============
An error of type E_ERROR was caused in line 112 of the file /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Obj.php. Error message: Uncaught InvalidArgumentException: item should be a Collection or an array or an object in /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Obj.php:112
Stack trace:
#0 [internal function]: WPML\FP\Obj::WPML\FP\{closure}()
#1 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array()
#2 [internal function]: WPML\FP\Obj::WPML\FP\{closure}()
#3 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array()
#4 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Obj.php(90): WPML\FP\Obj::__callStatic()
#5 [internal function]: WPML\FP\Obj::WPML\FP\{closure}()
#6 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array()
#7 [internal function]: WPML\FP\Obj::WPML\FP\{closure}()
#8 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array()
#9 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/classes/menu/jobs-list/class-wpml-tm-jobs-list-script-data.php(191): WPML\FP\Obj::__callStatic()
#10 [internal function]: WPML_TM_Jobs_List_Script_Data->{closure}()
#11 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(50): call_user_func_array()
#12 [internal function]: WPML\FP\{closure}()
#13 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(321): call_user_func_array()
#14 [internal function]: WPML\FP\Fns::WPML\FP\{closure}()
#15 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(164): array_map()
#16 [internal function]: WPML\FP\Fns::WPML\FP\{closure}()
#17 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array()
#18 [internal function]: WPML\FP\Fns::WPML\FP\{closure}()
#19 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array()
#20 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/classes/menu/jobs-list/class-wpml-tm-jobs-list-script-data.php(177): WPML\FP\Fns::__callStatic()
#21 [internal function]: WPML_TM_Jobs_List_Script_Data->{closure}()
#22 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Collection.php(603): array_map()
#23 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/classes/menu/jobs-list/class-wpml-tm-jobs-list-script-data.php(182): WPML\Collect\Support\Collection->map()
#24 /var/www/dev.milksustainabilitycenter.com/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()
#25 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/classes/jobs/Loader.php(24): WPML_TM_Jobs_List_Script_Data->get()
#26 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(207): WPML\TM\Jobs\Loader->getData()
#27 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(257): WPML\FP\Right->map()
#28 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(24): WPML\FP\Right->chain()
#29 /var/www/dev.milksustainabilitycenter.com/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wp/classes/Hooks.php(50): WPML\FP\Promise->resolve()
#30 /var/www/dev.milksustainabilitycenter.com/wp-includes/class-wp-hook.php(324): WPML\LIB\WP\Hooks::WPML\LIB\WP\{closure}()
#31 /var/www/dev.milksustainabilitycenter.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#32 /var/www/dev.milksustainabilitycenter.com/wp-includes/plugin.php(517): WP_Hook->do_action()
#33 /var/www/dev.milksustainabilitycenter.com/wp-settings.php(665): do_action()
#34 /var/www/dev.milksustainabilitycenter.com/wp-config.php(108): require_once('...')
#35 /var/www/dev.milksustainabilitycenter.com/wp-load.php(50): require_once('...')
#36 /var/www/dev.milksustainabilitycenter.com/wp-admin/admin.php(34): require_once('...')
#37 {main}
thrown
I reviewed the Error Log and identified the issue. It primarily arises from incomplete setup of the Admin profile, specifically when the First Name and Last Name fields are left empty or if the Email format is incorrect. Could you please attempt the following steps to see if they resolve the problem?
1. Navigate to Users > Profile and make sure you've correctly entered your First and Last name in the Profile section.
2. Next, go to "WPML > Translation Management > Translator."
3. If you've already added your profile as a translator, please remove it and then re-add it. If you haven't configured the Translator yet, you can leave it as it is.
Please check and let me know if that helps to solve the issue or if you need further assistance in this matter. I will be happy to help.
I managed to resolve the issue following your instructions. Thanks a lot!
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.