• Resolved andy_moyle

    (@andy_moyle)


    There’s a bug in your query line 789 AND p.post_type = %s – the problem comes when the post type has a – (eg in my case bible-readings) which causes a mysql error. Just needs some quotes round the %s to solve.

    [16-Jun-2022 05:08:16 UTC] WordPress database error Unknown column 'post' in 'where clause' for query SELECT
    									COUNT(*)
    								FROM
    									wp_djembe563_posts p
    								WHERE
    									p.post_password = ''
    									AND p.post_type = post
    									AND p.post_status = 'publish'
    									AND p.ID NOT IN (6)  made by 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_posts
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter andy_moyle

    (@andy_moyle)

    Version 4.15 of the plugin on WordPress 6.0

    Thanks for raising the issue. We have tracked your issue and tried to reproduce it, But unfortunately, we cannot. Can you please provide us with more information regarding this issue so we can debug it and assist you further? We also tried adding the “-” into the category and custom post type, but our sitemap got generated properly. We also need MySQL and PHP versions from your end.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Database query error’ is closed to new replies.