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 5 replies, has 2 voices.

Last updated by Riffaz 3 months, 3 weeks ago.

Assigned support staff: Riffaz.

Author Posts
June 19, 2019 at 5:47 am #4048073

DDC

I receive the error message below on several websites.

Plugin versions:
WPML Multilingual CMS - 4.2.7.1
WPML String Translation - 2.10.5.1
WPML Translation Management - 2.8.6.1
WPML Media - 2.5.2

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]
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 htb_icl_translations wpml_translations JOIN htb_posts p ON wpml_translations.element_id = p.ID AND wpml_translations.element_type = CONCAT('post_', p.post_type) JOIN htb_icl_translations tridt ON tridt.element_type = wpml_translations.element_type AND tridt.trid = wpml_translations.trid WHERE

June 19, 2019 at 10:24 am #4050615

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

Thank you for contacting WPML support.

I see the SQL query is wrong but we can not guess the reason of this.
We need more details to check this?

1. Since when this happens?
2. Did you update anything recently?
3. Did you delete anything recently?

Could you please go to WPML-> Support ->Troubleshooting and click the below buttons and let me know if that helps:

+ Set Language information
+ Clear Cache in WPML
+ Fix element types collation
+ Assign translation status to duplicated content

Further, If you disable all non-related WPML plugins, switch to one of the default themes, the problem persists or not?
NOTE:
+ Make a backup (both files and database) for your site before updating/proceeding anything (Always a good practice!).

Look forward to your reply.

Regards,
Riffaz.

June 21, 2019 at 7:41 am #4065289

DDC

Hi Riffaz,

Thanks for your comment.
None of the proposed solutions offers a solution.

All websites use the latest version. On all website i have the same problem.

Warning: Illegal offset type in isset or empty in /Users/corneflikweert/Projecten/technowestservices/web/app/plugins/wpml-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/corneflikweert/Projecten/technowestservices/web/wp/wp-includes/functions.php on line 4773
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 tws_icl_translations wpml_translations JOIN tws_posts p ON wpml_translations.element_id = p.ID AND wpml_translations.element_type = CONCAT('post_', p.post_type) JOIN tws_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/corneflikweert/Projecten/technowestservices/web/app/plugins/wpml-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 257

Warning: Illegal offset type in /Users/corneflikweert/Projecten/technowestservices/web/app/plugins/wpml-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 258

Warning: Illegal offset type in isset or empty in /Users/corneflikweert/Projecten/technowestservices/web/app/plugins/wpml-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php on line 262

June 22, 2019 at 11:56 am #4071011

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

It seems like some issues with the saved data and should be fixed when updating the data, do you have options page created with ACF? If yes, could you please update the options once and let me know if this helps?

Is your theme compatible with latest PHP?
If you switch the theme temporarily to a default theme like twenty seventeen, do you still see this issue?

If you disable these plugins do you see the issue?
1. WPML String Translation - 2.10.5.1
2. WPML Translation Management - 2.8.6.1
3. WPML Media - 2.5.2
4. Advanced Custom Fields : CPT Options Pages - 2.0.4
5. Advanced Custom Fields: Gravityforms Add-on - 1.2.1
6. Advanced Custom Fields Multilingual - 1.3.1

Let me know.

Regards,

June 24, 2019 at 2:42 pm #4078071

DDC

Hi Riffaz,

I disabled all the plugins one by one. When 'Advanced Custom Fields Multilingual' is disabled all problems are solved.

I then reactivated all plugins and saved all pages and ACF options again. Unfortunately, this does not solve the problem.

It seems that something is wrong with the 'Advanced Custom Fields Multilingual' plugin.

June 25, 2019 at 8:24 am #4082273

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

Could you please try this fix and let me know? https://wpml.org/forums/topic/warning-on-my-site/

Regards,

The topic ‘[Closed] SQL syntax error’ is closed to new replies.