Page 1 of 1

Archives sidebar plugin and entryproperties 0.34

Posted: Wed Dec 16, 2009 4:01 pm
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.

Re: Archives sidebar plugin and entryproperties 0.34

Posted: Wed Dec 16, 2009 4:03 pm
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.

Re: Archives sidebar plugin and entryproperties 0.34

Posted: Wed Dec 16, 2009 10:14 pm
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

Re: Archives sidebar plugin and entryproperties 0.34

Posted: Wed Dec 16, 2009 10:50 pm
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.

Re: Archives sidebar plugin and entryproperties 0.34

Posted: Thu Dec 17, 2009 5:20 pm
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