Home›Support›English Support›[Resolved] Illegal offset type in isset or empty /public_html/wp-content/plugins/sitepress-multilingual-cms/cla...
[Resolved] Illegal offset type in isset or empty /public_html/wp-content/plugins/sitepress-multilingual-cms/cla...
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing an 'Illegal offset type in isset or empty' error when saving a WooCommerce product in a non-primary language after updating to version 4.7.6 of a plugin. Solution: We recommended updating WooCommerce Multilingual to the latest version to resolve the issue. Here are the steps we suggested: 1. Go to Plugins → Add New Plugin. 2. Click on the Commercial tab. 3. Click the "Check for updates" button. https://wpml.org/wp-content/uploads/2020/04/wpml-force-plugin-update-1.png We also advised creating a backup before updating as a precaution.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at WPML support forum.
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.
Background of the issue:
I was trying to update a post in the backend of my WordPress site. This issue occurs when I save any WooCommerce product that is not in the primary language. The problem started after updating to version 4.7.6. The issue can be seen at this URL: hidden link.
Symptoms:
I encountered an error message: 'Illegal offset type in isset or empty' in /public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 282. Instead of seeing 'Product updated', I got an 'Uncaught Error'.
Questions:
Why am I getting an 'Illegal offset type' error when saving a WooCommerce product?
How can I resolve the error to successfully update products in non-primary languages?
Hi there. After doing a plugin conflict test. I found the issue is from this plugin: WooCommerce Multilingual & Multicurrency Version 5.5.0.
Kindly advise the next steps and how this can be fixed, even if it's just a temporary fix/patch for now. Thanks.
To help me further debug this issue, I’d like to set up your site on my local machine and do some more digging. Could you please share the wp-content and database backup of your site? You can zip these files and send them to me using a file-sharing platform like Google Drive. That way, I can take a look and see what’s going on.
I am downloading the files, in the meantime, can you try to update WooCommerce Multilingual to the latest version and see if the problem exists? We recently released an update of the plugin.
Our WPML updates are distributed gradually. If your websites haven't received this update yet, please be patient, and you should see it within a few days.