Title: Version 4.1.4 SQL error/warning
Last modified: June 7, 2022

---

# Version 4.1.4 SQL error/warning

 *  Resolved [saens](https://wordpress.org/support/users/saens/)
 * (@saens)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/version-4-1-4-sql-error-warning/)
 * 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) AS`year`,\n\t\t\t\t\tMONTH(post_date_gmt)
   AS`month`,\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)

 *  [JochenT](https://wordpress.org/support/users/jochent/)
 * (@jochent)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/version-4-1-4-sql-error-warning/#post-15716532)
 * 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.
 *  [opialm](https://wordpress.org/support/users/opialm/)
 * (@opialm)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/version-4-1-4-sql-error-warning/#post-15716591)
 * 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](https://wordpress.org/support/users/saens/)
 * (@saens)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/version-4-1-4-sql-error-warning/#post-15716605)
 * yeah , i’ve switched to using wordpress’ own sitemap builder using functions.
   php to do some tweaking and filtering
 *  [joelby37](https://wordpress.org/support/users/joelby37/)
 * (@joelby37)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/version-4-1-4-sql-error-warning/#post-15717773)
 * 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 3 years, 11 months ago by [joelby37](https://wordpress.org/support/users/joelby37/).

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

The topic ‘Version 4.1.4 SQL error/warning’ is closed to new replies.

 * ![](https://ps.w.org/google-sitemap-generator/assets/icon-256x256.png?rev=2713572)
 * [XML Sitemap Generator for Google](https://wordpress.org/plugins/google-sitemap-generator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-sitemap-generator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-sitemap-generator/)
 * [Active Topics](https://wordpress.org/support/plugin/google-sitemap-generator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-sitemap-generator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-sitemap-generator/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [joelby37](https://wordpress.org/support/users/joelby37/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/version-4-1-4-sql-error-warning/#post-15717773)
 * Status: resolved