Archives sidebar plugin and entryproperties 0.34

Found a bug? Tell us!!
Post Reply
Barberousse
Regular
Posts: 26
Joined: Sun Dec 30, 2007 8:07 pm

Archives sidebar plugin and entryproperties 0.34

Post by Barberousse »

Hello,

With the update of the serendipity_event_category plugin from version, 0.32 to 0.34, I have this error when I want to show the serendipity_archives_plugin sidebar plugin :
Query failed: <pre>SELECT count(DISTINCT e.id) AS orderkey


FROM
serendipity_entries AS e
LEFT OUTER JOIN serendipity_entryproperties ep_no_frontpage
ON (e.id = ep_no_frontpage.entryid AND ep_no_frontpage.property = 'ep_no_frontpage')
LEFT OUTER JOIN serendipity_entryproperties ep_cache_extended
ON (e.id = ep_cache_extended.entryid AND ep_cache_extended.property = 'ep_cache_extended')
LEFT OUTER JOIN serendipity_entryproperties ep_cache_body
ON (e.id = ep_cache_body.entryid AND ep_cache_body.property = 'ep_cache_body')
LEFT OUTER JOIN serendipity_entryproperties ep_access
ON (e.id = ep_access.entryid AND ep_access.property = 'ep_access')
WHERE e.timestamp >= 1259622000 AND e.timestamp <= 1262300399 AND isdraft = 'false' AND (ep_access.property IS NULL OR ep_access.value = 'member' OR ep_access.value = 'public' OR (ep_access.value = 'private' AND e.authorid = 1)) AND (ep_no_frontpage.property IS NULL OR ep_no_frontpage.value != 'true')


ORDER BY orderkey DESC, timestamp DESC,/*categorytemplate*/
</pre> / You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 17
It has something to do with the "ORDER BY" directive. I can see on the CVS view of Spartacus that some changed here have been made :

Code: Select all

$eventData['orderby'] = $this->sort_order;
is now

Code: Select all

$eventData['orderby'] = $this->sort_order . (!empty($this->sort_order) ? ',' : '') . $eventData['orderby'] . '/*categorytemplate*/';
Do you have any idea to correct the problem?

Thank you.

Barberousse.
Barberousse
Regular
Posts: 26
Joined: Sun Dec 30, 2007 8:07 pm

Re: Archives sidebar plugin and entryproperties 0.34

Post by Barberousse »

I use S9Y 1.4.1 by the way, and I sometimes have the same error as http://board.s9y.org/viewtopic.php?f=3&t=16129

Barberousse.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Archives sidebar plugin and entryproperties 0.34

Post by garvinhicking »

Hi!

Indeed, that was a bug. Instead of !empty($this->sort_order) it should've read !empty($eventData['orderby']). I changed that in the plugin, can you change it in your version and verify that it works for you?

Thanks for reporting!

As for the other problem: Are you using french as the version for your backend? Maybe it cannot properly parse the entities. Would you maybe allow me to ftp-access your installation to try some debugging? I can't reproduce it on my machine, but I'd love to get a hold of this errors!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Barberousse
Regular
Posts: 26
Joined: Sun Dec 30, 2007 8:07 pm

Re: Archives sidebar plugin and entryproperties 0.34

Post by Barberousse »

garvinhicking wrote:Instead of !empty($this->sort_order) it should've read !empty($eventData['orderby'])
It works now.
garvinhicking wrote:As for the other problem: Are you using french as the version for your backend? Maybe it cannot properly parse the entities. Would you maybe allow me to ftp-access your installation to try some debugging? I can't reproduce it on my machine, but I'd love to get a hold of this errors!
Yes, I use the french version. The behavior is not always easy to reproduce but it happens often with the styles listing.

I will send you my credentials by PM.

Barberousse.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Archives sidebar plugin and entryproperties 0.34

Post by garvinhicking »

Hi!

Many thanks! Due to your help I was able to see that some template/plugin authors entered their names as ISO-8859-1 strings, but the XML was UTF-8. The parser choked on some special characters, so the XML was empty for some plugins/templates. I've fixed this in the spartacus XML creation routines, so on the next update tomorrow, everything should be back at normal again.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply