Empty Series List Bug
Several folks have reported that the article list on the “Write Post” page does not contain a list of articles. I consider this a very serious bug, and want to get it fixed ASAP. For anyone experiencing this bug, please provide me with:
- The version of PHP you are using
- The version of MySQL you are using
- The version of WordPress you are using
I’m fairly sure that this is a MySQL issue — the list shows up fine for me (using MySQL 4.1.21, PHP 4.4.2, and both WordPress 2.0 and 2.1). Anyone experiencing this bug, please feed me info in the comments. If you can also tell me if the following query works, that would be awesome:
SELECT d.post_id,d.meta_value FROM (SELECT a.post_id,a.meta_value FROM (SELECT post_id,meta_value FROM wp_postmeta WHERE meta_key='_series_name') a JOIN (SELECT post_id,meta_value FROM wp_postmeta WHERE meta_key='_series_order') b ON a.post_id=b.post_id ORDER BY a.meta_value,CAST(b.meta_value AS SIGNED) DESC ) d GROUP BY d.meta_value ORDER BY CAST(d.post_id AS SIGNED) DESC;
Thanks folks; I hope I’ll get this resolved quick (but probably not tonight).


15 Responses to “Empty Series List Bug”
Posted: Mar 1st, 2007 at 20:50
Hi. Thanks again for looking into this. Here’s what I get when I try the above query:
Error
SQL query:
SELECT d.post_id, d.meta_value
FROM (
SELECT a.post_id, a.meta_value
FROM (
SELECT post_id, meta_value
FROM wp_postmeta
WHERE meta_key = ‘_series_name’
)a
JOIN (
SELECT post_id, meta_value
FROM wp_postmeta
WHERE meta_key = ‘_series_order’
)b ON a.post_id = b.post_id
ORDER BY a.meta_value, CAST( b.meta_value AS SIGNED ) DESC
)d
GROUP BY d.meta_value
ORDER BY CAST( d.post_id AS SIGNED ) DESC ;
MySQL said:
#1064 - 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 a.post_id,a.meta_value FROM (SELECT post_id,meta_value F
Hope this helps some…
Posted: Mar 1st, 2007 at 21:06
It looks like it doesn’t want to take the subquery — but I don’t understand why, because it’s perfectly valid.
What version of MySQL are you using?
And thank you soooo much for the feedback; it’s near impossible for me to debug this unless I can figure out how to reproduce it.
Posted: Mar 2nd, 2007 at 02:42
PHP Version 5.1.4 / MySQL Version 5.0.21
I don’t know too much about MySQL, so I’m sorry I can’t help out too much on my end!
Posted: Mar 2nd, 2007 at 06:40
All right; what does the query
select @@global.sql_mode;result in? If it returns anything except an empty value, could you trySET session sql_mode="";and then repeat the query in the post (and, naturally, tell me what sql_mode was set to in the first place)?Better yet, if you can get ahold of the SQL config file let me know; I’ll get in touch with you so you can send it to me via e-mail.
Thanks!
Posted: Mar 2nd, 2007 at 09:36
Hi,
I’ve been trying to get a sensible answer from the tech guys at my hosting company (IPowerweb) about something which may or may not be part of my problem. According to a phpinfo script I ran, I’m running MySQL 5.0.21 as stated above; however, when I enter phpMyAdmin, it shows my MySQL version as 4.0.16 on the main page as well as on the MySQL system variables…. Does that make any sense to you?
As for the above two queries, both of them are resulting in the following: #1193 - Unknown system variable ’sql_mode’
In my server variables and settings section; however, it shows sql mode as 0
But this is all Greek to me….
Posted: Mar 2nd, 2007 at 17:18
The MySQL version info was really, really helpful — if it’s 4.0.16, then my theory that it’s a SQL compatibility issue can still be true. All that I have to do is get that version of MySQL installed locally, now, so I can test it out.
(And you’re doing a fine job of carrying messages in Greek ;)
Posted: Mar 3rd, 2007 at 11:01
Even I have MySQL 4.0.16 installed… I have already sent you a dump of my DB…
Posted: Mar 3rd, 2007 at 13:52
All right, from the looks of it, subquery support was added in 4.1.0. Unfortunately, this means that In Series cannot presently operate properly on versions of MySQL before 4.1.
This may be fixed in 3.0, because I’m going to be restructuring tables. However, I don’t think I’m going to remove the subqueries from 2.x, because it would be a performance hit for everyone else, and because 4.0.x MySQL is EOL anyway.
I will, however, take a look and see if there’s something I can do.
Posted: Mar 3rd, 2007 at 20:25
PHP version 5.1.4
MySQL version 4.1.21-standard
WordPress version 2.1.2
In Series version: 2.2.0
The query worked. Got back two “rows” which noted the only two series. Initially the query did not work, as it tried to access the wrong database (I had 3 on that server). I deleted the database (no loss, I just hadn’t done it anyways), then the query worked.
In the Management section of the Dashboard, the series name shows up, but it doesn’t show up on in the edit section, nor does it show up on the single post series. I believe the In Series plugin worked normally at 2.1.0, and as near as I can tell (which, truly, is very little), neither MySQL nor PHP were updated between 2.1.0 and 2.1.2 (never did install 2.1.1). I know that WordPress made some structural changes to the code due to security and bugs. Is it possible that the way In Series is calling MySQL through WordPress is the issue? In other words, is it possible that the structural changes in WordPress changed how the In Series calls work? What versions of WordPress and In Series is everybody using, in addition to MySQL and PHP?
Posted: Mar 4th, 2007 at 00:25
@Starlyth
You are describing behavior that may constitute a bug, but it’s not this bug. :)
That said, I need to upgrade my WordPress installation and verify that In Series still works. I have not experienced the problems you are describing, but I have also not tried running with WordPress 2.1.2.
Posted: Mar 4th, 2007 at 02:19
I just contacted tech support at my webhosts, and they weren’t able to confirm what version of MySQL was running (?!?! apparently something may have gone wrong when they moved my site to a new server) so they will look into it further and upgrade it as necessary. If things miraculously correct themselves after this, I’ll let you know….
Posted: Mar 4th, 2007 at 09:36
I will wait with great anticipation your results. I wouldn’t be surprised if it is an issue with the new WordPress, but maybe not. Just a thought, perhaps it is the way I have it called:
ID, ’series_name’, TRUE);
if (” != $series)
{
echo “Article Series - $series\n”;
series_table_of_contents($series);
}
?>
Posted: Mar 6th, 2007 at 12:56
Well, I am not going to help you solve any bugs. IT WORKS! My database went bad somehow. I rebuilt it, and everything works now.
Thanks for the effort, and your continuing efforts in maintaining this extension.!
Posted: Mar 12th, 2007 at 10:21
I have installed v 2.2 of in-series (which is a great plugin btw) and in the options page I selected “Top” for the ToC option. Now I can’t get it to change back to “Bottom” (even though I select Bottom) and then Update. It always reverts back to Top. Clearing the cache, etc has not helped either. Any suggestions.
Thanks,
Anmol
Posted: Mar 12th, 2007 at 16:53
@Anmol
Gah! I thought I fixed that. I remember hitting that, and fixing it. But still, it is quite clearly released and a bug. I have a fix ready to go; I’ll do another release to take care of things.