Il s'agit du forum d'assistance technique de WPML, le plug-in multilingue pour WordPress.

Il est accessible à tous, toutefois seuls les clients de WPML peuvent y publier leurs messages. L'équipe de WPML répond aux messages du forum 6 jours sur 7, 22 heures sur 24.

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

Problem: Warning: Illegal offset type in isset or empty in /www/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 248 Notice: wpdb::prepare was called incorrectly. The query only expected one placeholder, but an array of multiple placeholders was sent. Please see Debugging in WordPress for more information. (This message was added in version 4.9.0.) in /www/wp-includes/functions.php on line 4667 WordPress database error: [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] Solution: https://wpml.org/forums/topic/conflict-with-acf-gallery-get_field/#post-3654221 Relevant Documentation:

This topic contains 3 réponses, has 2 participants.

Last updated by Bruno Kos il y a 5 mois et 1 semaine.

Assigned support staff: Bruno Kos.

Auteur Messages
mai 7, 2019 à 10:40

williamH-14

Bonjour,

nous sommes en train de finaliser un site utilisant wordpress (dernière version), ACF (dernière version) et WPML (dernière version).

Nous gérons le contenus de nos pages grace à repeater ACF contenant lui-même plusieurs types de groupe de champs.
Lors de l'instaciation des blocs contenant des galerie d'images, nous obtenons systématiquement l'erreur suivante :


Warning: Illegal offset type in isset or empty in /home/www/dev/dev2019_ecoles-conde_com/www/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 247

Notice: wpdb::prepare est appelée de la mauvaise manière. La requête n'attendait qu'un unique substitutif/placeholder, mais un tableau de multiples substitutifs a été envoyé. Veuillez lire Débogage dans WordPress (en) pour plus d'informations. (Ce message a été ajouté à la version 4.9.0.) in /home/www/dev/dev2019_ecoles-conde_com/www/wp-includes/functions.php on line 4667
Erreur de la base de données WordPress : [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB 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 edc_icl_translations wpml_translations JOIN edc_posts p ON wpml_translations.element_id = p.ID AND wpml_translations.element_type = CONCAT('post_', p.post_type) JOIN edc_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 /home/www/dev/dev2019_ecoles-conde_com/www/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 257

Warning: Illegal offset type in /home/www/dev/dev2019_ecoles-conde_com/www/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 /home/www/dev/dev2019_ecoles-conde_com/www/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 262

mai 7, 2019 à 10:52 #3756657

Bruno Kos
Supporter

Languages: Anglais (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

Can you please check this and tell me this workaround got the issue resolved?
https://wpml.org/forums/topic/conflict-with-acf-gallery-get_field/#post-3654221

Regards,
Bruno Kos

mai 7, 2019 à 12:15 #3757621

williamH-14

My issue is resolved now. Thank you!

As we edit a plugin file, it's not more possible to update.
Do you plan to push that change in your next release or do we need to monitor changes and report the code in the next releases ?

mai 7, 2019 à 12:18 #3757633

Bruno Kos
Supporter

Languages: Anglais (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Do you plan to push that change in your next release or do we need to monitor changes and report the code in the next releases ?

It will go into one of our next releases, but I can't tell you which one, as it hasn't been determined yet. Once a new ACFML version becomes available, you can check here if the fix has been implemented:
https://wpml.org/download/acfml/?section=changelog

Regards,
Bruno Kos