WordPress.org

Ready to get started?Download WordPress

Forums

Smarter Navigation
Bug in ID Query (4 posts)

  1. thasso
    Member
    Posted 3 years ago #

    Hi,

    I think there is a bug in the ID query regarding the LIMIT calculations. If your post count setting is > 500, the limit computation is wrong.

    To fix the problem, in main.php in the collect_ids() after this:

    $limit = explode(',', $query[1]);
    $start = (int) $limit[0];
    $finish = (int) $limit[1];

    add this line:

    if($finish - $start > $count) $count = $finish - $start;

    to increase $count eventually.

  2. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    The number of retrieved posts is artificially limited to 500.

    That's because the post ids are stored as a cookie, which gets sent back and forth on each request.

  3. thasso
    Member
    Posted 3 years ago #

    I understand that the number of stored IDs is limited, and of course it should be.

    The problem though is not the artificial limit but the fact that the calculation of the values for the queries 'LIMIT' parameter is broken if the post count in wordpress is set to something >500 (or whatever you set the cookie limit).

  4. scribu
    Member
    Plugin Author

    Posted 3 years ago #

    Please try the Development Version (1.3-alpha).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic