REM State

27 Feb

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”

  1. AvatarAnanda
    1

    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…

    Reply to this comment.
  2. AvatarQuandary
    2
    Author Comment

    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.

    Reply to this comment.
  3. AvatarAnanda
    3

    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!

    Reply to this comment.
  4. AvatarQuandary
    4
    Author Comment

    All right; what does the query select @@global.sql_mode; result in? If it returns anything except an empty value, could you try SET 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!

    Reply to this comment.
  5. AvatarAnanda
    5

    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….

    Reply to this comment.
  6. AvatarQuandary
    6
    Author Comment

    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 ;)

    Reply to this comment.
  7. AvatarVishwas
    7

    Even I have MySQL 4.0.16 installed… I have already sent you a dump of my DB…

    Reply to this comment.
  8. AvatarQuandary
    8
    Author Comment

    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.

    Reply to this comment.
  9. AvatarStarlyth
    9

    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?

    Reply to this comment.
  10. AvatarQuandary
    10
    Author Comment

    @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.

    Reply to this comment.
  11. AvatarAnanda
    11

    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….

    Reply to this comment.
  12. AvatarStarlyth
    12

    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);
    }
    ?>

    Reply to this comment.
  13. AvatarStarlyth
    13

    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.!

    Reply to this comment.
  14. AvatarAnmol
    14

    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

    Reply to this comment.
  15. AvatarQuandary
    15
    Author Comment

    @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.

    Reply to this comment.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Comment Preview:

© 2008 REM State | Entries (RSS) and Comments (RSS)

Global Positioning System Gazettewordpress logo