Query Error on RSS Feed

Found a bug? Tell us!!
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Good catch! I just committed your fix and bumped the version rev.

I also checked for other instances while I was in there.

Version 1.28 (plugin version 0.30) should be available within 24 hours from SPARTACUS.
Judebert
---
Website | Wishlist | PayPal
Freudi
Regular
Posts: 97
Joined: Thu Nov 23, 2006 6:29 am
Contact:

Post by Freudi »

Thanks, Judebert :)

Bye,
Freudi
Michael Harrison
Regular
Posts: 51
Joined: Sat Jan 28, 2006 12:50 pm

Re: Query Error on RSS Feed

Post by Michael Harrison »

I'm running into a very similar issue with the latest version of the plugin. I hadn't been paying attention to my feed for some time so I don't know if it broke during an upgrade or at some other time. I haven't deleted any table entries.
I'm a total sql noob so I'm not sure how best to go about debugging this.
Here's the error

Query failed: <pre>SELECT


e.id,
e.title,
e.timestamp,
e.comments,
e.exflag,
e.authorid,
e.trackbacks,
e.isdraft,
e.allow_comments,
e.last_modified,

a.realname AS author,
a.username AS loginname,
a.email


FROM
serendipity_entries AS e
LEFT JOIN serendipity_authors a
ON e.authorid = a.authorid
LEFT JOIN serendipity_entrycat ec
ON e.id = ec.entryid
LEFT JOIN serendipity_category c
ON ec.categoryid = c.categoryid

WHERE isdraft = 'false' AND e.timestamp <= 1245098100 AND (e.id NOT IN (SELECT e.id FROM serendipity_entries AS e
LEFT JOIN serendipity_entrycat AS ec ON ec.entryid = e.id
JOIN serendipity_categorytemplates AS t ON ec.categoryid = t.categoryid AND hide_rss = '1'))
GROUP BY e.id

ORDER BY last_modified DESC
LIMIT 1</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 'SELECT e.id FROM serendipity_entries AS e
Michael Harrison
Regular
Posts: 51
Joined: Sat Jan 28, 2006 12:50 pm

Re: Query Error on RSS Feed

Post by Michael Harrison »

4.0.27-standard-log
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Re: Query Error on RSS Feed

Post by kleinerChemiker »

Thats the problem. This query uses Subselects which are available since 4.1.
Michael Harrison
Regular
Posts: 51
Joined: Sat Jan 28, 2006 12:50 pm

Re: Query Error on RSS Feed

Post by Michael Harrison »

Does anyone know if it's possible to easily get an older version of the plugin? It used to work on my server and I don't know that I need the latest.
I probably burned myself with a blind upgrade. Most of the time that works fine with s9y. :-(
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Re: Query Error on RSS Feed

Post by kleinerChemiker »

Or ask your provider to upgrade MySQL. 4.0 is quite outdated. The stable is at 5.1.
Michael Harrison
Regular
Posts: 51
Joined: Sat Jan 28, 2006 12:50 pm

Re: Query Error on RSS Feed

Post by Michael Harrison »

I've done that but they aren't the most responsive in the world. I don't know what reasons they've got for keeping 4.0 on.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Re: Query Error on RSS Feed

Post by judebert »

Michael Harrison wrote:Does anyone know if it's possible to easily get an older version of the plugin? It used to work on my server and I don't know that I need the latest.
I probably burned myself with a blind upgrade. Most of the time that works fine with s9y. :-(
Yeah, the easy upgrade usually works. It's when the hosting company has changed the settings for their supporting programs that things get weird. I remember one company that kept PHP4 with one configuration, but if you upgraded to use PHP5 you got a different (and buggy) configuration. Ick.

While upgrading to MySQL 5.1 is your best bet, it could take your provider a while to get there. If you don't want to switch providers, you can get the older version of the categorytemplates plugin from CVS: http://php-blog.cvs.sourceforge.net/vie ... templates/. You can find the version of the plugin file you want and overwrite the one in your plugins/serendipity_event_categorytemplates/ directory.
Judebert
---
Website | Wishlist | PayPal
Michael Harrison
Regular
Posts: 51
Joined: Sat Jan 28, 2006 12:50 pm

Re: Query Error on RSS Feed

Post by Michael Harrison »

I went the upgrade route and that's not only been a whole ton of fun (not) but now I've got a slightly different error happening when I enable that plugin.

Query failed: <pre>SELECT


e.id,
e.title,
e.timestamp,
e.comments,
e.exflag,
e.authorid,
e.trackbacks,
e.isdraft,
e.allow_comments,
e.last_modified,

a.realname AS author,
a.username AS loginname,
a.email


FROM
serendipity_entries AS e
LEFT JOIN serendipity_authors a
ON e.authorid = a.authorid
LEFT JOIN serendipity_entrycat ec
ON e.id = ec.entryid
LEFT JOIN serendipity_category c
ON ec.categoryid = c.categoryid

WHERE isdraft = 'false' AND e.timestamp <= 1245435600 AND (e.id NOT IN (SELECT e.id FROM serendipity_entries AS e
LEFT JOIN serendipity_entrycat AS ec ON ec.entryid = e.id
JOIN serendipity_categorytemplates AS t ON ec.categoryid = t.categoryid AND hide_rss = '1'))
GROUP BY e.id

ORDER BY last_modified DESC
LIMIT 1</pre> / Unknown column 'hide_rss' in 'on clause'<br />
<b>Fatal error</b>: Allowed memory size of 268435456 bytes exhausted (tried to allocate 451872336 bytes) in <b>Unknown</b> on line <b>0</b><br />
Michael Harrison
Regular
Posts: 51
Joined: Sat Jan 28, 2006 12:50 pm

Re: Query Error on RSS Feed

Post by Michael Harrison »

Never mind. Thanks to the incompetence of my hosting company they're going to have to move me back to the old server.
*sigh*
Gotta find a different host.
Michael Harrison
Regular
Posts: 51
Joined: Sat Jan 28, 2006 12:50 pm

Re: Query Error on RSS Feed

Post by Michael Harrison »

Great. I've been moved to a server with mysql 5.0.67 and php 4.4.1 and I'm getting this...

Query failed: <pre>SELECT


e.id,
e.title,
e.timestamp,
e.comments,
e.exflag,
e.authorid,
e.trackbacks,
e.isdraft,
e.allow_comments,
e.last_modified,

a.realname AS author,
a.username AS loginname,
a.email


FROM
serendipity_entries AS e
LEFT JOIN serendipity_authors a
ON e.authorid = a.authorid
LEFT JOIN serendipity_entrycat ec
ON e.id = ec.entryid
LEFT JOIN serendipity_category c
ON ec.categoryid = c.categoryid

WHERE isdraft = 'false' AND e.timestamp <= 1245499800 AND (e.id NOT IN (SELECT e.id FROM serendipity_entries AS e
LEFT JOIN serendipity_entrycat AS ec ON ec.entryid = e.id
JOIN serendipity_categorytemplates AS t ON ec.categoryid = t.categoryid AND hide_rss = '1'))
GROUP BY e.id

ORDER BY last_modified DESC
LIMIT 1</pre> / Unknown column 'hide_rss' in 'on clause'
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Query Error on RSS Feed

Post by garvinhicking »

Hi!

IT seems that you might have removed the categorytemplates plugin, then upgraded it, and re-installed it again, which has caused an inconsistency in the database. Usually if you upgarde plugins, it should be done while those are still installed, so that the plugins routines can take care of upgrading possible SQL statemeents.

Try to execute this in phpMyAdmin:

Code: Select all

ALTER TABLE serendipity_categorytemplates ADD
       COLUMN hide_rss varchar(4) default false
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