[EventCalendar] EC3 v3.1.1 RC1 bug on WP 2.2.1

Mathias Block mathias at ww.tu-berlin.de
Wed Jul 25 14:32:10 UTC 2007

Hello list,

I'm running EC3 V3.1.1 RC1 on a German WP 2.2.1 system and have just
encountered a bug when using "keep events separate". MySQL complains
that the query string is faulty, and obviously it is,
DATE_FORMAT(wp_posts.ec3_sch.start DESC,'%Y-%m-%d') DESC,
DATE_FORMAT(wp_posts.ec3_sch.start DESC,'%T') DESC LIMIT 0, 10

where it should read
DATE_FORMAT(ec3_sch.start,'%Y-%m-%d') DESC,
DATE_FORMAT(ec3_sch.start,'%T') DESC LIMIT 0, 10

This seems to be caused by ec3_filter_posts_orderby, where in line 267
of eventcalendar3.php it should firstly read
$regexp='/\wp_posts.bpost_date\b( DESC\b| ASC\b)?/i';
instead of
$regexp='/\bpost_date\b( DESC\b| ASC\b)?/i';
and the whole of the regexp and the following replacement code needs
change for the DATE_FORMAT bit (to get rid of the double DESC).

I have hacked something together for my version of WP to fix this
problem but I doubt my hack is a solution that would work for everyone
so I won't publish this here ;-)


More information about the EventCalendar mailing list