Home›Support›English Support›[Resolved] Split: WordPress database error You have an error in your SQL syntax
[Resolved] Split: WordPress database error You have an error in your SQL syntax
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is encountering a WordPress database error related to SQL syntax while using WPML. Solution: 1. We asked the client to inform us where they are encountering the error. 2. We suggested clearing the debug log to check if the issue persists. 3. We recommended performing a test with only WPML plugins enabled to isolate the issue. 4. We emphasized the importance of taking a database backup before making any changes.
Please note that the solution provided might be outdated or not applicable to your case. If after trying the suggested steps the issue persists, we encourage you to open a new support ticket with us. We also highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please contact us through the 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.
Thank you for your reply, and about this error in the wp-debug:
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 ')
AND translations.source_language_code IS NOT NULL
AND ( posts.post_sta' at line 16 for query
SELECT jobs.rid, jobs.job_id as jobId, jobs.editor_job_id as ateJobId, jobs.automatic , translation_status.status,
translation_status.review_status, jobs.ate_sync_count > 100 as isLongstanding
FROM jhbwp_icl_translate_job as jobs
INNER JOIN jhbwp_icl_translation_status translation_status ON translation_status.rid = jobs.rid
INNER JOIN jhbwp_icl_translations translations ON translation_status.translation_id = translations.translation_id
INNER JOIN jhbwp_icl_translations parent_translations ON translations.trid = parent_translations.trid
AND parent_translations.source_language_code IS NULL
LEFT JOIN jhbwp_posts posts ON parent_translations.element_id = posts.ID
WHERE
jobs.job_id IN (
SELECT MAX(job_id) FROM jhbwp_icl_translate_job
GROUP BY rid
)
AND jobs.editor = 'ate'
AND ( translation_status.status IN (1,2,40) OR 1=0 )
AND translations.language_code IN ()
AND translations.source_language_code IS NOT NULL
AND ( posts.post_status IS NULL OR posts.post_status <> 'trash' )
made by require_once('wp-admin/admin.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, WPMLLIBWPHooks::WPMLLIBWP{closure}, WPMLFPPromise->resolve, WPMLFPRight->chain, WPMLFPRight->map, WPMLTMATELoader::getData, WPMLTMATEJobs::getJobsToSync, WPMLTMATEJobs::getJobsWithStatus
[06-Feb-2024 08:14:36 UTC] 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 ')
AND translations.source_language_code IS NOT NULL
AND ( posts.post_sta' at line 16 for query
SELECT jobs.rid, jobs.job_id as jobId, jobs.editor_job_id as ateJobId, jobs.automatic , translation_status.status,
translation_status.review_status, jobs.ate_sync_count > 100 as isLongstanding
FROM jhbwp_icl_translate_job as jobs
INNER JOIN jhbwp_icl_translation_status translation_status ON translation_status.rid = jobs.rid
INNER JOIN jhbwp_icl_translations translations ON translation_status.translation_id = translations.translation_id
INNER JOIN jhbwp_icl_translations parent_translations ON translations.trid = parent_translations.trid
AND parent_translations.source_language_code IS NULL
LEFT JOIN jhbwp_posts posts ON parent_translations.element_id = posts.ID
WHERE
jobs.job_id IN (
SELECT MAX(job_id) FROM jhbwp_icl_translate_job
GROUP BY rid
)
AND jobs.editor = 'ate'
AND ( translation_status.status IN (30) OR translation_status.review_status IN ( 'NEEDS_REVIEW','EDITING' ) )
AND translations.language_code IN ()
AND translations.source_language_code IS NOT NULL
AND ( posts.post_status IS NULL OR posts.post_status <> 'trash' )
made by require_once('wp-admin/admin.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, WPMLLIBWPHooks::WPMLLIBWP{closure}, WPMLFPPromise->resolve, WPMLFPRight->chain, WPMLFPRight->map, WPMLTMATELoader::getData, WPMLTMATEJobs::getJobsWithStatus
Can you please let me know where you are encountering the error? Also, could you try clearing the debug log to see if the issue persists?
Could you perform a quick test with only WPML plugins enabled?
Before making any changes, it is highly recommended to take a database backup first.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.