Viewing 7 replies - 16 through 22 (of 22 total)
  • circuitor

    (@circuitor)

    “Actually as I see it – WP shouldn’t show the “previous” when there are no more posts to show: as it does on the index.”

    Agreed! I wish it was working that way. Any ideas?

    circuitor

    (@circuitor)

    Found the answer!
    It is a bug and will be fixed for WP version 1.6.

    See the midle of this list here:
    https://codex.www.ads-software.com/Version_1.6#Themes.2C_Templates_and_Template_Tags

    Nope, still there — running freshy theme on 2.0.3

    Figured out what the problem is, I am getting a redundant subfolder call for some reason on every “Previous Entries” link, i.e.,

    yorku.ca/gags/~gags instead of
    yorku.ca/gags/

    If I change the Blog Address in the general options, I can get it to work, but every other link is disrupted. Will look into the theme…

    I’ve gathered from other posts that there is something wrong with how the $index and $qtr strings are being set in lines 394-396 of wp-includes/template_functions_links.php.

    Any ideas? One defines the previous entries link in “manage posts” and the home page ($index), while the other affects category or archives. ($qtr).

    Actually, I found that my subdomain wordpress installation is working fine, but my tilda’d site isn’t — so it’s definitely something to do with the server redirection… Hmmm..

    GOT IT!

    It’s ugly but it works. To get rid of the redundant subdomain, just subtract that part of the $index and $qstr strings that is giving the problems.

    To see what they originally were getting, I ran a trace script on the $_SERVER calls in the get_pagenum_link function:


    <?php
    echo $_SERVER['REQUEST_URI'];
    echo $_SERVER['PHP_SELF'];
    ?>

    This gave the orginating file as well as the subdomain. BINGO!

    Thus to lines 377 to 398 of template_functions_links.php, I added a substr php command to excise this problematic subdomain:


    $qstr = wp_specialchars($_SERVER['REQUEST_URI']);
    $qstr = substr ($qstr, 8);
    ...
    $index = $_SERVER['PHP_SELF'];
    $index = substr ($index, 6);

    The discrepancy in the substr calls are because I am getting %7E in $qstr, two characters more than the regular single ~ in $index.

    Thus in general, for $qstr, the number should be the length of subdomain name + 4, and for $index it should be +2.

    This seems to have cleared up other 404 errors originating from the login as well as all instances of previous/next entries misdirection.

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘“Previous Entries” Bug’ is closed to new replies.