Tracker: Bugs

7 Posts list and query returns no rows - ID: 3485384
Last Update: Comment added ( tomlev )

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.


Dangior ( Dangior ) - 2012-02-07 07:03:06 PST

7

Open

None

Nobody/Anonymous

None

None

Public


Comments ( 3 )

Date: 2012-05-04 14:25:56 PDT
Sender: tomlev

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


Date: 2012-03-29 15:05:56 PDT
Sender: mkrawats

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.


Date: 2012-02-08 13:22:40 PST
Sender: debettap

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.


Attached File ( 1 )

Filename Description Download
posts.jpg No rows returned Download

Changes ( 2 )

Field Old Value Date By
priority 5 2012-02-07 07:09:30 PST Dangior
File Added 435130: posts.jpg 2012-02-07 07:03:11 PST Dangior