Title: Database call error
Last modified: June 11, 2020

---

# Database call error

 *  [SJNBham](https://wordpress.org/support/users/sjnbham/)
 * (@sjnbham)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/database-call-error/)
 * When opening The Events Calendar events main view on the WordPress backend (/
   wp-admin/edit.php?post_type=tribe_events), we get the following error logged 
   using the Query Monitor plugin:
 * **Caller:** WP_Query-> get_posts()
    **Component:** Plugin: wp-nested-pages **
   Query:**
 *     ```
       SELECT SQL_CALC_FOUND_ROWS DISTINCT posts.ID
       FROM posts
       LEFT JOIN postmeta as tribe_event_end_date
       ON ( posts.ID = tribe_event_end_date.post_id
       AND tribe_event_end_date.meta_key = '_EventEndDateUTC' )
       WHERE 1=1
       AND posts.post_type = 'tribe_events'
       AND (posts.post_status = 'publish'
       OR posts.post_status = 'acf-disabled'
       OR posts.post_status = 'tribe-ea-success'
       OR posts.post_status = 'tribe-ea-failed'
       OR posts.post_status = 'tribe-ea-schedule'
       OR posts.post_status = 'tribe-ea-pending'
       OR posts.post_status = 'tribe-ea-draft'
       OR posts.post_status = 'future'
       OR posts.post_status = 'draft'
       OR posts.post_status = 'pending'
       OR posts.post_status = 'private')
       ORDER BY EventStartDate DESC, posts.post_date DESC
       LIMIT 0, 10 /* From [/wp-admin/edit.php?trashed=1&post_type=page&ids=15033&page=nestedpages] in [/wp-content/plugins/wp-nested-pages/app/Entities/Listing/ListingRepository.php:74] */
       ```
   
 * **Error Message:** Unknown column ‘EventStartDate’ in ‘order clause’
 * The events post type is not selected in Settings > Nested Pages > Post Types.
 * Not sure what the issue is, but we thought there wouldn’t be any queries related
   to Nested Pages when going to that section of WordPress if the event post type
   isn’t selected. We’ve tried to reliably reproduce the issue, but it seems to 
   be hit and miss. Thought we’d report it in case there’s a possible bug where 
   Nested Pages is still querying the database for post types it’s not configured
   to manage.
 * Thanks for any info you can pass along.

Viewing 1 replies (of 1 total)

 *  [carlosonweb](https://wordpress.org/support/users/carlosonweb/)
 * (@carlosonweb)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/database-call-error/#post-13138589)
 * Try the fix suggested here:
 * [https://wordpress.org/support/topic/unknown-column-eventstartdate-in-order-clause/#post-13138586](https://wordpress.org/support/topic/unknown-column-eventstartdate-in-order-clause/#post-13138586)

Viewing 1 replies (of 1 total)

The topic ‘Database call error’ is closed to new replies.

 * ![](https://ps.w.org/wp-nested-pages/assets/icon-128x128.png?rev=1690043)
 * [Nested Pages](https://wordpress.org/plugins/wp-nested-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-nested-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-nested-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-nested-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-nested-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-nested-pages/reviews/)

## Tags

 * [TEC](https://wordpress.org/support/topic-tag/tec/)

 * 1 reply
 * 2 participants
 * Last reply from: [carlosonweb](https://wordpress.org/support/users/carlosonweb/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/database-call-error/#post-13138589)
 * Status: not resolved