Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#10 Posts list and query returns no rows

open
nobody
None
7
2013-08-17
2012-02-07
Anonymous
No

The issue is that just installed correctly in the admin page, posts section I see that there's one post but the list is empty, even if I create more posts, list is always empty, no rows. Also related with this, on the Home page when I click in one category or month like (February 2012), it supposes to show the posts in that category/month but instead of that shows nothing, any post found.
This happend just after installing wp with plugin and adding some posts.

Discussion


  • Anonymous
    2012-02-07

    No rows returned

     
    Attachments

  • Anonymous
    2012-02-07

    • priority: 5 --> 7
     
    Last edit: Anonymous 2015-01-03
  • Peter DeBetta
    Peter DeBetta
    2012-02-08

    translations.php
    line 726
    Change this: $pattern = '/LIMIT\s*(\d+)((\s*,?\s*)(\d+)*)(;{0,1})$/is';
    to this: $pattern = '/LIMIT\s*(\d+)((\s*,?\s*)(\d+)*);{0,1}$/is';

    Removing the extra parentheses allows "LIMIT 0, 10" to become "TOP 10". With the extra parentheses, the "0" is used instead.

     
  • MarcK
    MarcK
    2012-03-29

    We followed the instructions posted by debettap on 2012-02-08 13:22:40 PST. This seems to have fixed the problem for us too. Thank you, debettap.

     
  • tomlev
    tomlev
    2012-05-04

    The cause of the bug was the extra capture for ';' : the code checked that limit_matches had 5 elements, but it now has 6... But for some reason, changing the comparison to check that there are 6 captured elements seems to break many things, not sure why. The easy fix is to change the regex from this:

    /LIMIT\s*(\d+)((\s*,?\s*)(\d+)*)(;{0,1})$/is

    to that:

    /LIMIT\s*(\d+)((\s*,?\s*)(\d+)*);?$/is

    The ';' doesn't need to be captured, since it's removed anyway...

     
  • Any updates on this bug?

     
    • tomlev
      tomlev
      2013-08-17

      I wouldn't expect to see any update on this bug (or any other bug). This project is long dead (the last change in the code was in January 2012), and has never been really stable. For months I put up with its many bugs, but I eventually migrated my Wordpress blog to a MySQL database.

      WP was just not designed to use an alternative DBMS, its architecture doesn't permit it, it's too intimately coupled with MySQL. Translating the SQL queries isn't a viable option, because there are always cases where it doesn't work.

       
      • thanks