• Hello,

    I just saw the error as below when my wordpress blog updated to 4.8.2, I have no idea of the errors. Anything will be lost ? Please help !!

    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 ‘%1$s )’ at line 3]
    SELECT internal_link_count, incoming_link_count, object_id FROM wp2p_yoast_seo_meta WHERE object_id IN ( %1$s )

Viewing 5 replies - 1 through 5 (of 5 total)
  • Seems to be a problem with the Yoast SEO plugin. Try manually updating it by downloading a fresh copy from https://en-au.www.ads-software.com/plugins/wordpress-seo/ and replacing the wordpress-seo plugin folder with the new copy via FTP.

    try repairing your database may be it will solve your error.

    It is a problem with the SEO plugin – but it’s not solved by re-installing the plugin. It’s due to WordPress’s update, as that puts new checks in place when calling $wpdb->prepare() to block some more obscure entries. Thats’ basically “broken” the queries that the plugin uses. It’s happened on at least two of my sites so far, and thankfully the rest are either not showing that problem or haven’t needed any updates since that WordPress update.

    The one good thing is that it doesn’t affect saving any data. It just shows that err, everything saves, but it doesn’t show the page again as the headers can’t be sent.

    I’m sure it will get sorted out, but until then I’d suggest watching the support forum for the plugin to see what’s said on there. Also, might be worth posting there too. More voices might get something dome about it sooner.

    Hi,

    Try This in File wordpress-seo\admin\links\class-link-column-count.php in function name get_results().

    Please change the following query.

    Before Changing query:

    $results = $wpdb->get_results(
    $wpdb->prepare( ‘
    SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN ( %1$s )’,
    implode( ‘,’, $post_ids )
    ),
    ARRAY_A
    );

    After Changing query:

    $imploded_post_ids = implode( ‘,’, $post_ids );
    $results = $wpdb->get_results(
    ‘SELECT internal_link_count, incoming_link_count, object_id
    FROM ‘ . $storage->get_table_name() . ‘
    WHERE object_id IN ( ‘.$imploded_post_ids.’)’,ARRAY_A
    );
    and check.

    Thread Starter sammiewong

    (@sammiewong)

    Thanks all of your advices!!
    This error fixed! Yoast SEO Plugin support just suggested to update the plugin to the version 5.4.1

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Database error after the WordPress automatically updated to 4.8.2’ is closed to new replies.