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 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: America/Los_Angeles (GMT-07:00)
Tagged: Exception
This topic contains 11 replies, has 2 voices.
Last updated by Bobby 1 year, 8 months ago.
Assisted by: Bobby.
Author | Posts |
---|---|
August 3, 2023 at 10:29 am #14148309 | |
Claude B |
<h1>I am trying to:</h1> Looking at the translation queue with a specific user (using WPML String Translation 3.2.6) <h1>Link to a page where the issue can be seen:</h1> The issue requires an account, I am happy to provide an access for WPML support to help <h1>I expected to see:</h1> I expect the translation queue to show the data without any error <h1>Instead, I got:</h1> PHP throws an error Fatal error: Uncaught InvalidArgumentException: item should be a Collection or an array or an object in /code/web/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 /code/web/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 /code/web/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array(Object(Closure), Array) #4 /code/web/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 /code/web/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 /code/web/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array(Object(Closure), Array) #9 /code/web/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 /code/web/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}('my-mm', 12) #13 /code/web/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(321): call_user_func_array(Object(Closure), Array) #14 [internal function]: WPML\FP\Fns::WPML\FP\{closure}('my-mm', 12) #15 /code/web/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(164): array_map(Object(Closure), Array, Array) #16 [internal function]: WPML\FP\Fns::WPML\FP\{closure}(Object(Closure), Array) #17 /code/web/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array(Object(Closure), Array) #18 [internal function]: WPML\FP\Fns::WPML\FP\{closure}(Object(Closure), Array) #19 /code/web/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array(Object(Closure), Array) #20 /code/web/wp-content/plugins/sitepress-multilingual-cms/classes/menu/jobs-list/class-wpml-tm-jobs-list-script-data.php(177): WPML\FP\Fns::__callStatic('map', Array) #21 [internal function]: WPML_TM_Jobs_List_Script_Data->{closure}(Array, 'en') #22 /code/web/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Collection.php(603): array_map(Object(Closure), Array, Array) #23 /code/web/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)) #24 /code/web/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) #25 /code/web/wp-content/plugins/sitepress-multilingual-cms/classes/jobs/Loader.php(24): WPML_TM_Jobs_List_Script_Data->get() #26 /code/web/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(207): WPML\TM\Jobs\Loader->getData(Array) #27 /code/web/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(257): WPML\FP\Right->map(Array) #28 /code/web/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(24): WPML\FP\Right->chain(Array) #29 /code/web/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wp/classes/Hooks.php(50): WPML\FP\Promise->resolve(Object(WPML\FP\Right)) #30 /code/web/wp-includes/class-wp-hook.php(308): WPML\LIB\WP\Hooks::WPML\LIB\WP\{closure}('') #31 /code/web/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #32 /code/web/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #33 /code/web/wp-settings.php(645): do_action('wp_loaded') #34 /code/web/wp-config.php(251): require_once('/code/web/wp-se...') #35 /code/web/wp-load.php(50): require_once('/code/web/wp-co...') #36 /code/web/wp-admin/admin.php(34): require_once('/code/web/wp-lo...') #37 {main} thrown in /code/web/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Obj.php on line 112 <h1>What have I done so far:</h1> - I have tried to found the specific data in the database that is causing the issue (without success) We are seeing this issue in many environments, so would appreciate a fix/patch we can efficiently apply on multiple environments. Many thanks |
August 4, 2023 at 6:23 pm #14156537 | |
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
I would like to request temporary access (wp-admin and FTP) to your site to test the issue. **Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken ** I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/ NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin. Thank you, |
August 9, 2023 at 8:44 am #14173695 | |
Claude B |
Hi Bobby, |
August 10, 2023 at 12:06 am #14178775 | |
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
Hi there, What is the user account that has the error? I have not been able to reproduce the fatal error yet and I have checked the WPML->Translations queue as well as the WPML->Translaiton Management->Jobs queue The one issue that I do see is that there are a lot of authentication errors in WPML->Support->ATE Error Logs This will cause translations to not be able to open in the Advanced Translation Editors as the site is attempting to communicate with the ATE server but it can't authenticate. (most likely caused due to it being a staging site that was possibly copied from a prod environment) |
August 10, 2023 at 5:51 am #14179145 | |
Claude B |
Hi there, Thank you for helping with this issue - much appreciated. Many thanks |
August 10, 2023 at 8:34 pm #14184987 | |
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
I must have missed that, thank you very much - - I was able to reproduce. Have you possibly edited this user's capabilities? (when I review them they look like they are all there. ) I was able to add myself as a new user and the issue did not reproduce. As a test can I or you remove this user and re-add them then test again? Let me know your results, please. |
August 11, 2023 at 6:33 am #14185965 | |
Claude B |
We haven't changed the user capabilities. The issue just started to appear without any specific reasons (my guess is the latest version of WPML being faulty but that is why we need an expert on this matter). Feel free to do any tests you need to, to get to the bottom of this issue. The instance you are working on has been created just for you to explore this issue. Would removing the user (then adding the user back in) affects anything around WPML? Like the queue or the content already translated (by that specific user)? Also, removing the user doesn't really explain why we are seeing this issue in the first place. I understand that it helps with the situation but we really need to squash this issue as we have quite a lot of translators (on few distinct instances) and having such bug is really disturbing our operations. Many Thanks |
August 12, 2023 at 12:47 am #14191059 | |
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
Removing the user and re adding him would not cause any issues as wheneever a user is removed in WP, you are asked to assign all their work to another user. You could simply create another user for them with a different email, assign the content and then delete old user account and move the email to the new one. This is simply a workaround to get you moving forward with your development, however, I can escalate this and have our team take a closer look. I do not believe this is caused by a bug in the new version as this would of affected all users. Most likely the user is missing some capabilities or meta fields in the database. Will update you once I have more news. In the meantime let's leave the staging site as is so our team can review. |
August 14, 2023 at 8:39 am #14195949 | |
Claude B |
Thank you Bobby for your help with this issue. |
August 14, 2023 at 6:17 pm #14199459 | |
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
Please try the following and let me know your results: 1. Update WPML and the add-on plugins to their latest versions. You can find them here if needed https://wpml.org/downloads/ If the issue persists move to step 2. 2. run the following snippet: function wpmlsupp_1706_reset_wpml_capabilities() { Just add the above code in your theme's functions.php file (between the <!--?php and ?--> tags) and visit once the front-page. Then you can remove this snippet. Please let me know if this fixes the issue. Thank you! NOTE: Always have a recent and working backup before making any changes recommended by our team or a 3rd party |
August 15, 2023 at 7:47 am #14201555 | |
Claude B |
Thanks Bobby - Much appreciated |
August 15, 2023 at 6:55 pm #14205075 | |
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
You are welcome, let me know your results ! |
The topic ‘[Closed] Uncaught InvalidArgumentException: item should be a Collection or an Object’ is closed to new replies.