WordPress.org

Ready to get started?Download WordPress

Forums

bug in pagination with nextpage when using category in permalink (5 posts)

  1. fozloki
    Member
    Posted 3 years ago #

    Hi everyone, this is my first post here, please be kind to me ;-)

    Today I used nextpage for the first time. The result on the page
    http://www.emscherwasser.de/2005/03/15/it/php/fehlerseiten/
    was a link to
    http://www.emscherwasser.de/2005/03/15/it/php/fehlerseiten/2/

    But going to http://www.emscherwasser.de/2005/03/15/it/php/fehlerseiten/2/ only results in a redirect to http://www.emscherwasser.de/2005/03/15/it/php/fehlerseiten/ back again.

    I looked into it for hours and finally found out, that the reason is located in my permalinks. As you might see above I have the permalink structure
    /%year%/%monthnum%/%day%/%category%/%postname%/
    (so "php" is a subcategory of "it", the postname ist "fehlerseiten").

    When I change this to e.g. /%year%/%monthnum%/%day%/%postname%/ then everything works fine!

    Is this the right place for asking for a bug fix? Or does someone know where I have to fix something for myself? I am new to WordPress.

  2. fozloki
    Member
    Posted 3 years ago #

    BTW: http://www.emscherwasser.de/2005/03/15/it/php/fehlerseiten/?page=2 is displayed correctly, only the created http://www.emscherwasser.de/2005/03/15/it/php/fehlerseiten/2/ does not do the job.
    I temporarily modified my pagebar plugin to append "?page=$page" but this is no nice solution.

  3. morticya33
    Member
    Posted 3 years ago #

  4. SauloB
    Member
    Posted 3 years ago #

    Yeah, I'm thinking about changing the nextpage function to append the "?page" code too.

    Does anyone know how or where?

  5. heygaryc
    Member
    Posted 3 years ago #

    This is a known bug with WordPress 3.0, and there is a bug fix logged in the Trac database, found here:
    http://core.trac.wordpress.org/ticket/13471

    As a temporary and immediate fix on my site, we made a very small change to the post-template.php file in the wp-includes directory.

    You need to replace line 622, which currently looks like this:
    $output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">';

    With:
    $output .= '</a><a href="' . trailingslashit(get_permalink()) . user_trailingslashit('?page=' . $i, 'single_paged') . '">';

    THEN, also replace line 636 in exactly the same way, replacing:
    $output .= '</a><a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">';

    With:
    $output .= '</a><a href="' . trailingslashit(get_permalink()) . user_trailingslashit('?page=' . $i, 'single_paged') . '">';

    It should work fine after this fix.

Topic Closed

This topic has been closed to new replies.

About this Topic