Title: WordPress Database Error in Sitemap
Last modified: February 29, 2020

---

# WordPress Database Error in Sitemap

 *  Resolved [DimaW](https://wordpress.org/support/users/dimaw/)
 * (@dimaw)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-in-sitemap/)
 * Hello, i found the following error in the debug.log of my site or when i visit
   the sitemap URL:
 *     ```
       WordPress-Datenbank-Fehler Unknown column 'EventStartDate' in 'order clause' für Abfrage SELECT SQL_CALC_FOUND_ROWS DISTINCT dr_posts.ID FROM dr_posts  LEFT JOIN
        dr_term_relationships ON (dr_posts.ID = dr_term_relationships.object_id) LEFT JOIN
        dr_postmeta as tribe_event_end_date ON ( dr_posts.ID = tribe_event_end_date.post_id AND
        tribe_event_end_date.meta_key = '_EventEndDate' )  WHERE 1=1  AND ( 
         dr_term_relationships.term_taxonomy_id IN (134,135,148)
   
       ) AND dr_posts.post_type = 'tribe_events' AND (dr_posts.post_status = 'publish' OR
        dr_posts.post_status = 'hidden' OR dr_posts.post_status = 'expired' OR
        dr_posts.post_status = 'archived' OR dr_posts.post_status = 'tribe-ea-success' OR
        dr_posts.post_status = 'tribe-ea-failed' OR dr_posts.post_status = 'tribe-ea-schedule' OR dr_posts.post_status = 'tribe-ea-pending' OR dr_posts.post_status = 'tribe-ea-draft'
        OR dr_posts.post_status = 'private') GROUP BY dr_posts.ID ORDER BY EventStartDate DESC, dr_posts.post_modified DESC LIMIT 0, 1 von require('wp-blog-header.php'), wp, WP->main,
        WP->query_posts, WP_Query->query, WP_Query->get_posts,
        do_action_ref_array('pre_get_posts'), WP_Hook->do_action, WP_Hook->apply_filters,
        WPSEO_Sitemaps->redirect, WPSEO_Sitemaps->build_sitemap, WPSEO_Sitemaps->build_root_map, WPSEO_Taxonomy_Sitemap_Provider->get_index_links, WP_Query->__construct, WP_Query->query, WP_Query->get_posts
       ```
   
 * I am not sure if your Plugin creates this broken Query or the Events Calendar
   Plugin. The Problem ist the “order by EventStartDate”, because it does not exists.
 * I would be happy, if you can help me finding the source of this error 🙂
    -  This topic was modified 6 years, 3 months ago by [DimaW](https://wordpress.org/support/users/dimaw/).

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

 *  [Pcosta88](https://wordpress.org/support/users/pcosta88/)
 * (@pcosta88)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-in-sitemap/#post-12528203)
 * Hi,
 * We would like some more information.
 * 1. Can you confirm you are using WordPress 5.3.2? You can check by clicking on
   the W in the top left and selecting About. If you need to update, please check
   with your host provider. Please know that if you are using an older version of
   WordPress Core you may experience unexpected behavior with Yoast. This guide 
   explains more: https://yoast.com/why-we-dont-support-old-wordpress-versions/.
 * 2. Are all your non-Yoast plugins and themes also updated?
 * 3. Can you confirm you are using the most recent Yoast SEO, v13.2? If you update,
   does the issue resolve?
 * 4. If you visit your sitemap and look at it do any errors appear on the page?
   If so, can you describe the error or take a screenshot of it? You can use a tool
   like: [https://pasteboard.co/](https://pasteboard.co/) to share the image.
 * OR is the issue that you are only getting this error in your debug log?
 *  Plugin Support [amboutwe](https://wordpress.org/support/users/amboutwe/)
 * (@amboutwe)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/wordpress-database-error-in-sitemap/#post-12553614)
 * This thread has been marked as resolved due to a lack of activity.
 * You’re always welcome to re-open this topic. Please read [this post](https://wordpress.org/support/topic/read-this-before-your-post/)
   before [opening a new request](https://wordpress.org/support/plugin/wordpress-seo#new-post).
 * Thanks for understanding!

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

The topic ‘WordPress Database Error in Sitemap’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [amboutwe](https://wordpress.org/support/users/amboutwe/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/wordpress-database-error-in-sitemap/#post-12553614)
 * Status: resolved