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

Dr. Peter Troxler peter.troxler at gmx.net
Wed Jul 25 16:06:27 UTC 2007


why, then, does my testinstall wp21.stachanow.net not show the mysql  
error? has that to do with the german translation? or some fancy  
config issue?

/ pt

On 25-jul-2007, at 18:00, Mathias Block wrote:

> Hi Peter,
>
>> Mathias, you must be using a funny version of EC 3.1.1._rc1 since
>> the  download does *not contain this bug,
>> see http://wpcal.svn.sourceforge.net/viewvc/wpcal/branches/ec3_1/
>> eventcalendar3/eventcalendar3.php?revision=245&view=markup
> Sorry, I was off by one with the line number -- but the code is
> exactly as here, and it does contain the line (266):
> $regexp='/\bpost_date\b( DESC\b| ASC\b)?/i';
> which leaves wp_posts in the query string. The following query then
> goes bang - at least here.
>
> Additionally, this alone doesn't solve the problem with double DESC in
> the query string (probably because of the DATE_FORMAT).
>
> Regards,
> Mathias.
>
>> On 25-jul-2007, at 16:32, Mathias Block wrote:
>>
>>> 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,
>>> reading
>>> [...]
>>> 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 ;-)
>>>
>>> Regards,
>>> Mathias.
>>>
>>>
>>>
>>> _______________________________________________
>>> Blog: http://wpcal.firetree.net/
>>> EventCalendar at firetree.net mailing list
>>> Unsubscribe: http://penguin.firetree.net/eventcalendar
>>
>>
>> _______________________________________________
>> Blog: http://wpcal.firetree.net/
>> EventCalendar at firetree.net mailing list
>> Unsubscribe: http://penguin.firetree.net/eventcalendar
>
>
> _______________________________________________
> Blog: http://wpcal.firetree.net/
> EventCalendar at firetree.net mailing list
> Unsubscribe: http://penguin.firetree.net/eventcalendar




More information about the EventCalendar mailing list