• Not showing posts while working with sql server.
    The problem is in file translations.php, the part which replaces Limit statement to Top statement.
    The following lines

    // Check for true offset
            if ( count($limit_matches) == 5 && $limit_matches[1] != '0' ) {
                $true_offset = true;
            } elseif ( count($limit_matches) == 5 && $limit_matches[1] == '0' ) {
                $limit_matches[1] = $limit_matches[4];
            }

    should be rewritten as

    // Check for true offset
            if ( count($limit_matches) == 5 && $limit_matches[1] != '0' ) {
                $true_offset = true;
            } elseif ( count($limit_matches) >= 5 && $limit_matches[1] == '0' ) {
                $limit_matches[1] = $limit_matches[4];
            }

    ” == 5 ” in elseif replaced as ” >= 5 “

    http://wordpress.org/extend/plugins/wordpress-database-abstraction/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thank you for the fix!

    I’m not sure if this fix caused the problem, but pagination is not working for. Did you have similar results?

    Thread Starter andreymakarov

    (@andreymakarov)

    Sorry, I’m not sure. I cann’t reproduce ’cause I’m having only one page of posts. But I promise – I’ll check that later =)

    I am having the same problems listed here. First it was not showing posts, used the above fix and that worked. Now however, pagination is not working. With multiple pages of posts, when I click to go to the next page, it says I’m on page 2, but the posts are all the page 1 posts. Click next page, index at bottom says page 3, but still on page 1 posts. Thanks,

    I think the better fix is in the thread below. The fix works for the admin section to show posts AND for pagination. Check the REGEX update by Yoren, it actually is reverting to previous code but fixed my issue for me.

    Thread Link

    Just found another way to fix this issue.

    Because I found in 1.1.3, the same $limit_matches equations worked, so I read the changelog and I think is the line 726:

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

    should be changed back as 1.1.3:

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

    Although it seems to fix the “limit regex to catch queries with ; at the end” issue, but will cause new issue here.

    Run into the same problem and fixed the pagination by applying the same principle used in the first post

    // Check for true offset
            if ( count($limit_matches) >= 5 && $limit_matches[1] != '0' ) {
                $true_offset = true;
            } elseif ( count($limit_matches) >= 5 && $limit_matches[1] == '0' ) {
                $limit_matches[1] = $limit_matches[4];
            }

    since the regular expression added the support for ; the number of matches should be increased in both comparisons

    This is to confirm to use both LukeG84 and CriGoT suggestion works

    1. show the media library correctly, with ot without pagination.
    2. may edit and delete post in media library.

    You have to change two sections. Both in function translate_limit().

    Section 1:

    From:’/LIMIT\s*(\d+)((\s*,?\s*)(\d+)*)(;{0,1})$/is’
    To: ‘/LIMIT\s*(\d+)((\s*,?\s*)(\d+)*)$/is’;

    Section 2 (Two if comparision statement):

    From: count($limit_matches) == 5
    To: count($limit_matches) >= 5

    Wish it helps!

    I signed up to these forums simply to post a THANK YOU!

    I’ve no idea how I found this post, but the details here worked perfectly.

    Thank you, thank you very much 🙂

    Erm… But 🙂

    Now I can’t view any Users??

    Sorry, ignore my last, I missed the post by amigoccs 😉

    Followed the instructions above and fixed everything except now categories are not displaying. They show up in admin (but all categories have “0” under the Posts column) and even when you click on a post it has the category assigned properly but in the sidebar where it list categories it says there are no categories. any ideas?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: WP Db Abstraction] Not showing posts’ is closed to new replies.