[EventCalendar] Days with events only won't show up

Mathias Burbach mathiasburbach at yahoo.com
Sun Nov 10 11:24:50 GMT 2013

Hello Julien,

Thanks for your reply. I have been away for a few days but now I am back and want to resolve this problem for our church website.

Julien wrote on 30th October 2013:

I've just updated to WP3.7 and everything works allright for me.I have installed the SQL Monitor plugin (see also here) and checked the query that is executed on the server side:

(SELECT DISTINCT id, post_title,
  GREATEST(start,'2013-11-01 00:00:00') AS start_date,
  LEAST(end,'2013-12-01 00:00:00') AS end_date,
  allday, 1 AS is_event
 FROM wp_posts,wp_ec3_schedule
 WHERE post_status='publish'
     AND post_type='post'
     AND post_id=id
     AND end>='2013-11-01 00:00:00'
     AND start<'2013-12-01 00:00:00' ) 
(SELECT DISTINCT id, post_title, 
  post_date AS start_date,
  post_date AS end_date,
  0 AS allday, 0 AS is_event
 FROM wp_posts
 WHERE post_status='publish'
   AND post_type='post'
     AND post_date>='2013-11-01 00:00:00'
     AND post_date<'2013-12-01 00:00:00'
     AND post_date<NOW() ) 
ORDER BY id, allday DESC, start_date, is_event DESC

The resultset shows the blog entry that was published on the 2nd November 2013 with an event date of 9th November 2013 twice, once on the publishing date and once on the event date. But because of the Order By clause with the ID first they may not be fetched in the right order from the MySQL server.

Here are the PHP call stack:
wp-includes/wp-db.php, 1530 (DbProfile::query)
wp-content/plugins/event-calendar/template-functions.php, 148 (wpdb::get_results)
wp-content/plugins/event-calendar/template-functions.php, 312 (ec3_util_calendar_days)
wp-content/themes/blue-wonder-10/sidebar.php, 14 (ec3_get_calendar)
wp-includes/template.php, 441 (require_once)
wp-includes/template.php, 417 (load_template)
wp-includes/general-template.php, 95 (locate_template)
wp-content/themes/blue-wonder-10/index.php, 54 (get_sidebar)
wp-includes/template-loader.php, 74 (include)
wp-blog-header.php, 16 (require_once)
index.php, 17 (require)

I will see if I can tweak the PHP source code of my old Blue Wonder template to make the event appear on the 9th November 2013.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://penguin.firetree.net/pipermail/eventcalendar/attachments/20131110/7b395f9b/attachment.html>

More information about the EventCalendar mailing list