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 thread is resolved. Here is a description of the problem and solution.

Problem:
Latest version of ACFML (1.2) displays a Warning: Illegal offset type in isset or empty message.
Solution:
Just simply go to wp-content/plugins/acfml/classes folder through FTP, edit the file called class-wpml-acf-attachments.php and edit the line 13 from this:

if ( is_serialized($value) ) {

to this

if ( is_serialized($value) || is_array($value) ) {

100% of people find this useful.

This topic contains 3 replies, has 2 voices.

Last updated by joeyG-3 6 months ago.

Assigned support staff: Radu.

Author Posts
April 25, 2019 at 10:11 am #3681013

joeyG-3

I am trying to:
Display the acf gallery
Link to a page where the issue can be seen:
hidden link

There is no error when I only add 1 image.
The error is also visible in the admin.

Warning: Illegal offset type in isset or empty in /Users/joeygrant/www/air-wp/public/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 247

Notice: wpdb::prepare werd verkeerd aangeroepen. De query verwachtte één placeholder, maar er is een array met meerdere placeholders verzonden. Lees Foutopsporing in WordPress voor meer informatie. (Dit bericht is toegevoegd in versie 4.9.0.) in /Users/joeygrant/www/air-wp/public/wp-includes/functions.php on line 4667
WordPress databasefout: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 9]
SELECT wpml_translations.translation_id, wpml_translations.element_id, wpml_translations.language_code, wpml_translations.source_language_code, wpml_translations.trid, wpml_translations.element_type FROM wp_icl_translations wpml_translations JOIN wp_posts p ON wpml_translations.element_id = p.ID AND wpml_translations.element_type = CONCAT('post_', p.post_type) JOIN wp_icl_translations tridt ON tridt.element_type = wpml_translations.element_type AND tridt.trid = wpml_translations.trid WHERE


Warning: Illegal offset type in isset or empty in /Users/joeygrant/www/air-wp/public/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 257

Warning: Illegal offset type in /Users/joeygrant/www/air-wp/public/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 258

Warning: Illegal offset type in isset or empty in /Users/joeygrant/www/air-wp/public/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 262
April 25, 2019 at 1:07 pm #3682651

Radu
Supporter

Languages: English (English )

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

Hey Joey,

Thank you for reaching out the WPML support!

This is an issue that we already fixed. If you want, you can apply an early fix that you can use until a new version of the ACFML plugin is released.

Just simply go to wp-content/plugins/acfml/classes folder through FTP, edit the file called class-wpml-acf-attachments.php and edit the line 13 from this:

if ( is_serialized($value) ) {

to this

if ( is_serialized($value) || is_array($value) ) {

You can do this change and tell me if things are back to normal. This fix will definitely be included in the next update of the plugin but this is an early fix so you don't have to wait for the update.

Thanks,
Radu

April 25, 2019 at 1:52 pm #3683069

joeyG-3

Thanks for your fast reply!

I can confirm that your solution works.

May 20, 2019 at 9:41 am #3845675

joeyG-3

Hi, just want to let you know that after updating to 1.3, the above fix is removed.