• Resolved Gerdski

    (@gerdski)


    Hello!

    I just updated WP from 6.0.9 to 6.8 and NGG from 3.29 to 3.59.11. Since then I receive many errors like this:

    WordPress database error 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 
    'FROM wp_posts WHERE 1=1 AND ((wp_posts.post_type = 'post' AND (wp_pos...'
    at line 2 for query
    SELECT SQL_CALC_FOUND_ROWS all
    FROM wp_posts
    WHERE 1=1 AND ((wp_posts.post_type = 'post'
    AND (wp_posts.post_status = 'publish')))
    AND wp_posts.ID not in(149007)
    ORDER BY wp_posts.post_date DESC
    LIMIT 0, 30 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/branfordmagazine-child/single.php'), related_posts, yarpp_related, YARPP->display_related, YARPP->get_template_content, include('/themes/branfordmagazine-child/yarpp-template-pex2.php'), get_the_excerpt, apply_filters('get_the_excerpt'), WP_Hook->apply_filters, wp_trim_excerpt, apply_filters('the_content'), WP_Hook->apply_filters, Imagely\NGG\IGW\ATPManager->substitute_placeholder_imgs, Imagely\NGG\DataMapper\DriverBase->find, Imagely\NGG\DataMapper\WPPostDriver->run_query, WP_Query->__construct, WP_Query->query, WP_Query->get_posts

    I checked the files to be included, but there’s nothing wrong with them. The references to Imagely\NGG led me to the suspicion that it has something to do with the NextGen Gallery Plugin.

    How can I fix this error?

    • This topic was modified 11 months, 3 weeks ago by Gerdski.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @gerdski,

    Thank you for reaching out,

    We were aware of the issue, and it was resolved with the NextGEN Gallery version 3.59.11. Updating to the latest version should have fixed the issue.

    If the error is still appearing, I suggest you download a fresh copy of the latest NextGEN Gallery and, then replace the one from your site’s Dashboard > Plugins > Add new plugin > Upload plugin > Choose File (with the files’ override when being asked) to see if that’ll fix the issue?

    Let me know the updates and I will get back to you.

    Thanks!

    Thread Starter Gerdski

    (@gerdski)

    Hello,

    thanks for your reply. I found a post by another user having the exact same error. I followed the instructions and installed 3.59.11 and it worked. Tried to post this here twice, but it didn’t work. Hope it works now.

    Error is resolved 🙂 Thanks a lot!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘SQL syntax error after WP & NGG update’ is closed to new replies.