Skip Navigation

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

Problem:
When trying to edit an existing translation or add a translation you get a critical error on the site.

Solution:
- Go to WPML -> Translation Management -> Translators
- Click on the Pencil/Edit icon beside the user you want to edit the translation as.
- Make sure to assign the correct language pair and save.

Relevant Documentation:
https://wpml.org/documentation/translating-your-contents/how-to-set-up-local-translators-and-language-pairs/#adding-local-translators-through-translation-management

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.

This topic contains 7 replies, has 3 voices.

Last updated by Subash Chandra Poudel 1 year, 10 months ago.

Assisted by: Subash Chandra Poudel.

Author Posts
August 12, 2023 at 6:50 pm #14192117

marcusM-10

Trying to edit any translation gives a WP critical error. Errors with debugging turned on is:
[12-Aug-2023 16:22:39 UTC] PHP Fatal error: Uncaught InvalidArgumentException: item should be a Collection or an array or an object in /home/petoxy-ojbiub12f/webapps/Petoxygen-hk/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Obj.php:112

August 12, 2023 at 9:30 pm #14192215

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

Before your ticket is assigned to one of my colleagues, I will try to help.

Can you please first create a full website backup and then try the recommendation of my colleagues from the top 5-7 existing ticket results in the custom search URL I created for you below:

hidden link

Please let us know how things go.

Mihai Apetrei

August 15, 2023 at 2:40 pm #14203877

marcusM-10

I've tried some of the solutions there including:
- Set the theme to WP default
- Deactivated ALL plugins except for WPML
- Deleted all WPML plugins and then downloaded and reinstalled from the WPML website.

Please can you escalate as I don't know what else to try.

August 17, 2023 at 2:53 am #14241903

Subash Chandra Poudel

Hi there,

Since you haven't shared the site debug info I am not able to check your site settings. But from the error, It seems like the error is being caused due to a known error with an older version of the WPML String translation plugin as explained in the erratum linked next:

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

Also, more details on site debug info and how to share it: http://wpml.org/faq/provide-debug-information-faster-support/

Please check and confirm if you are using the latest version of WPML plugins on the site from wp-admin -> Plugins -> Add New -> Commercial ( tab )

If the issue is still there with the latest version of WPML plugins, I would need to take a closer look at your site. So would you please mind sharing temporary access (WP-Admin and FTP) to your site? Preferably to a test site where the problem has been replicated. Also, please let me know the exact steps/process for me to see/replicate the issue on the site at my end.

I have enabled a private reply for you to share the credentials securely, which means only you and I have access to it.

IMPORTANT: Please take a complete backup of the site first to avoid data loss.

✙ I would additionally need your permission to make a copy of the site with plugins like Duplicator and deploy it on my local machine to test the issue further.

Regards,
Subash

August 18, 2023 at 8:47 am #14250845

Subash Chandra Poudel

Thank you for the details. I am working on the issue.

I will let you know as soon as I have a result.

August 20, 2023 at 3:37 am #14257615

Subash Chandra Poudel

Thank you for your patience.

After troubleshooting the issue further it seems like the Language pairs were not correctly assigned to the user for translation and that was causing the issue.

To fix the issue in your live site please go to WPML -> Translation Management -> Translators then click on the Pencil/Edit icon beside the use you want to edit the translation as and make sure to assign the correct language pair and save.

More details at: https://wpml.org/documentation/translating-your-contents/how-to-set-up-local-translators-and-language-pairs/#adding-local-translators-through-translation-management

August 21, 2023 at 7:27 am #14260249

marcusM-10

Thanks, that seems to have resolved it.

August 21, 2023 at 3:30 pm #14265685

Subash Chandra Poudel

Thank you for confirming the issue is resolved now.

Feel free to contact us again in future if you need any help with WPML.