• Resolved saens

    (@saens)


    Hi,
    Am on most current version (4.1.4):
    [Tue Jun 07 10:31:22.125338 2022] [lsapi:warn] [pid 1931371:tid 139879568504576] [client 141.138.169.238:51950] [host domain.com] Backend log: WordPress databasefout 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 '08:31:22\n\t\t\t\t\tAND post_status = 'publish'\n\t\t\t\t\tAND post_type = 'post'\n\t\t\t\tGRO...' at line 9 bij query SELECT DISTINCT\n\t\t\t\t\tYEAR(post_date_gmt) ASyear,\n\t\t\t\t\tMONTH(post_date_gmt) ASmonth,\n\t\t\t\t\tMAX(post_date_gmt) AS last_mod,\n\t\t\t\t\tcount(ID) AS posts\n\t\t\t\tFROM\n\t\t\t\t\twp_posts\n\t\t\t\tWHERE\n\t\t\t\t\tpost_date_gmt < 2022-06-07 08:31:22\n\t\t\t\t\tAND post_status = 'publish'\n\t\t\t\t\tAND post_type = 'post'\n\t\t\t\tGROUP BY\n\t\t\t\t\tYEAR(post_date_gmt),\n\t\t\t\t\tMONTH(post_date_gmt)\n\t\t\t\tORDER BY\n\t\t\t\tpost_date_gmt DESC gemaakt door require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, GoogleSitemapGeneratorLoader::do_template_redirect, GoogleSitemapGeneratorLoader::call_show_sitemap, GoogleSitemapGenerator->show_sitemap, do_action('sm_build_content'), WP_Hook->do_action, WP_Hook->apply_filters, GoogleSitemapGeneratorStandardBuilder->content, GoogleSitemapGeneratorStandardBuilder->build_archives\n

Viewing 4 replies - 1 through 4 (of 4 total)
  • The SQL query has a syntax error at post_date_gmt < 2022-06-07 08:31:22 as the value ‘2022-06-07 08:31:22’ is not enclosed in quotes.

    I would say its safe to abandon this plugin as the new owner/maintainer makes new SQL syntax errors with each update and doesnt bother to fix the old ones

    Thread Starter saens

    (@saens)

    yeah , i’ve switched to using wordpress’ own sitemap builder using functions.php to do some tweaking and filtering

    For what it’s worth, I think there’s another similar error in class-googlesitemapgeneratorstandardbuilder.php:190:

    AND p.post_type = " . $post_type . "
    should be
    AND p.post_type = '" . $post_type . "'

    • This reply was modified 2 years, 9 months ago by joelby37.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Version 4.1.4 SQL error/warning’ is closed to new replies.