Title: WordPress database error: [Unknown column &#8216;date&#8217; in &#8216;order clause&#8217;]
Last modified: November 8, 2022

---

# WordPress database error: [Unknown column ‘date’ in ‘order clause’]

 *  Resolved [paigeeinboden](https://wordpress.org/support/users/paigeeinboden/)
 * (@paigeeinboden)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/wordpress-database-error-unknown-column-date-in-order-clause/)
 * I’m stuck on what the cause and fix to this issue is.
 * I’m running WPML Plugin, Divi Events Calendar plugin, and The Events Calendar.
 * Divi Events said the issue is with The Events Calendar.
 * I’m getting am error appearing in the header of my public page where I have an
   event feed.
 * This is what the error says:
 *     ```
       WordPress database error: [Unknown column 'date' in 'order clause']
       SELECT wp_posts.* FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) INNER JOIN wp_tec_occurrences ON wp_posts.ID = wp_tec_occurrences.post_id JOIN wp_icl_translations wpml_translations ON wp_posts.ID = wpml_translations.element_id AND wpml_translations.element_type = CONCAT('post_', wp_posts.post_type) WHERE 1=1 AND ( ( ( wp_postmeta.meta_key = '_tribe_events_status' AND wp_postmeta.meta_value = 'postponed' ) OR ( wp_postmeta.meta_key = '_tribe_events_status' AND wp_postmeta.meta_value = 'canceled' ) ) AND wp_tec_occurrences.post_id IS NOT NULL AND CAST(wp_tec_occurrences.end_date AS DATETIME) >= '2022-11-08 14:11:30' ) AND wp_posts.post_type = 'tribe_events' AND ((wp_posts.post_status = 'publish')) AND ( ( ( wpml_translations.language_code = 'en' OR ( wpml_translations.language_code = 'en' AND wp_posts.post_type IN ( 'project','tribe_organizer','tribe_events','et_header_layout','et_body_layout','et_footer_layout' ) AND ( ( ( SELECT COUNT(element_id) FROM wp_icl_translations WHERE trid = wpml_translations.trid AND language_code = 'en' ) = 0 ) OR ( ( SELECT COUNT(element_id) FROM wp_icl_translations t2 JOIN wp_posts p ON p.id = t2.element_id WHERE t2.trid = wpml_translations.trid AND t2.language_code = 'en' AND ( p.post_status = 'publish' OR p.post_type='attachment' AND p.post_status = 'inherit' ) ) = 0 ) ) ) ) AND wp_posts.post_type IN ('post','page','attachment','wp_block','wp_template','wp_template_part','wp_navigation','et_pb_layout','project','tribe_venue','tribe_organizer','tribe_events','et_header_layout','et_body_layout','et_footer_layout' ) ) OR wp_posts.post_type NOT IN ('post','page','attachment','wp_block','wp_template','wp_template_part','wp_navigation','et_pb_layout','project','tribe_venue','tribe_organizer','tribe_events','et_header_layout','et_body_layout','et_footer_layout' ) ) GROUP BY wp_tec_occurrences.occurrence_id ORDER BY date DESC, CAST(wp_tec_occurrences.start_date AS CHAR) ASC, post_date ASC
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwordpress-database-error-unknown-column-date-in-order-clause%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [GeoffBel](https://wordpress.org/support/users/geoffbel/)
 * (@geoffbel)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/wordpress-database-error-unknown-column-date-in-order-clause/#post-16183673)
 * Hey [@paigeeinboden](https://wordpress.org/support/users/paigeeinboden/)
 * Yikes! Our apologies for that.
    The folks from Divi Events calendar are right,
   there are unfortunately a few issues that are currently impacting our Divi users.
 * The good news is that several of those should be resolved by our next update (
   which is going on next week).
 * Can you tell me if one of the following applies to you:
    1. You are using a Divi page template? (e.g.: for header and footer)
    2. You have checked the following column in The Events Calendar settings: include
       events in main blog loop?
 * Hang in there!
    Geoff
 *  Thread Starter [paigeeinboden](https://wordpress.org/support/users/paigeeinboden/)
 * (@paigeeinboden)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/wordpress-database-error-unknown-column-date-in-order-clause/#post-16186651)
 * Hi Geoff,
 * 1) I am using a divi page template through the “Divi Theme Builder” feature.
   
   2) This is not currently checked. Should it be?
 * Thank you so much for your reply and for helping with this. What is the plugin
   version number that I should watch for?
 * Thank you!
    Paige
 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-unknown-column-date-in-order-clause/#post-16215680)
 * Hi [@paigeeinboden](https://wordpress.org/support/users/paigeeinboden/), for 
   the delay here, I’m back now.
 * We just released The Events Calendar 6.0.4. We fixed quite a few errors in this
   release, and it may have solved this issue as well. Please update and let us 
   know if that fixes the issue here.
 * To be safe, we’d recommend conducting tests and updates on a [Staging Server](https://theeventscalendar.com/knowledgebase/k/creating-and-using-a-wordpress-staging-site/)
   and keep a working backup of your website.
 * Also, please clear any caching for both third-party plugins and server-side (
   if you have any). It would also be good to [flush permalinks](https://theeventscalendar.com/knowledgebase/k/fixing-http-404-errors/#flush-permalinks).
 * Best,
    Abz
 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-unknown-column-date-in-order-clause/#post-16260000)
 * Hey [@paigeeinboden](https://wordpress.org/support/users/paigeeinboden/), this
   thread has been inactive for a while, so we’re going to go ahead and mark it 
   Resolved. Please feel free to open a new thread if any other questions come up,
   and we’d be happy to help.
 * Cheers,
    Abz

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

The topic ‘WordPress database error: [Unknown column ‘date’ in ‘order clause’]’ 
is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-unknown-column-date-in-order-clause/#post-16260000)
 * Status: resolved