WordPress.org

Ready to get started?Download WordPress

Forums

posts_nav_link with permalink structure fails (18 posts)

  1. RichardF
    Member
    Posted 8 years ago #

    I have the standard permalink structure and have replaced %postname% with %post_id%: as follows /index.php/%year%/%monthnum%/%day%/%post_id%/. I'm able to access all of my pages with this structure.

    When I look at my home page which breaks at 10 posts - I can click on the next link and it takes me to /index.php/page/2/ - everything seems to work.

    When I look at a category page with more than 10 posts and click on the next link it also takes me to /index.php/page/2/ instead of /index.php/category/category-name/page/2/.

    I'm using IIS 6 on a W2003 server.

    It looks like posts_nav_link doesn't pick up permalink structure. By the way when I remove the permalink structure everything works ok.

    Any ideas?

  2. What's your category permalink structure set to?

  3. RichardF
    Member
    Posted 8 years ago #

    /index.php/category

  4. RichardF
    Member
    Posted 8 years ago #

    I also checked the database table wp-options and both permalink_structure and category_base contain the structure above.

  5. liquilife
    Member
    Posted 8 years ago #

    I've got a similair issue. I posted another thread and someone pointed out this one so I thought I would add to this. My permalink ends up looking like:
    http://www.tonicnews.com/go/news/page/2/
    which gives me a 404 page not found. If I manually type in:
    http://www.tonicnews.com/go/news/page2/
    it displays the next page.

    However, if I view an archive by date my permalink looks like this for the "next page":
    http://www.tonicnews.com/go/date/2005/07/page/2/
    which works perfectly. I'm confused.

    My structure is pretty simple, in the WP permalinks options I have the structure field filled in like this:
    /%category%/%post_id%

    Everything works perfectly with the exception of the next page URL in the category archive. Has anyone figured out a solution yet? This seems like it would be a pretty large issue considering the amount of people who use permalinks and utilize the next page link. Is this more of an isolated issue to just a few?

  6. liquilife
    Member
    Posted 8 years ago #

    Is this a bug with wordpress? Or is there maybe something I can do to fix this?

    Anyone....

  7. bobsta
    Member
    Posted 8 years ago #

    ok, im having the same problem.

    On the first page it seems to follow the permalinks ok. Infact I a address (www.shedonline.tk) and then upgraded to a (www.shedonline.net).

    My problem is the same. In the archives it doesnt follow the permalink. Infact it wont change. It will just display the old address.

    Please someone figure out this problem!
    thanks bobsta :P

  8. sanitizer
    Member
    Posted 8 years ago #

    I'm also having the problem with the permalink.

    When I look at my home page which breaks at 1 post and click on the next link it takes me to /page/2/index.php/ instead of /page/2/.

    I'm using Apache.

    btw, this is the http://www.family-improvement.com

  9. sanitizer
    Member
    Posted 8 years ago #

    anyone?

  10. svedman
    Member
    Posted 8 years ago #

    I have this problem too, with posts_nav_link not working with permalinks. All other permalinks work fine, the .htaccess file is correct.

    I'm using version 1.5.2.

    In Options, my WordPress address is:
    http://www.svedman.tk/blog

    And my Blog address is:
    http://blog.svedman.tk.

    The Next Page URI looks like this:
    http://blog.svedman.tk/blog/page/2/

    When it should look like this:
    http://www.svedman.tk/blog/page/2/

    So, apparently, posts_nav_link use the Blog address from Options when it should be using the WordPress address?

  11. nickyg622
    Member
    Posted 8 years ago #

    Apparently, it's the category name that causes this error. Try removing %category% from the permalink and it should work. This seems like a bug in wordpress to me.

  12. DaveReed
    Member
    Posted 8 years ago #

    I have a similar problem. The post_nav_link works fine on the category and archive pages. My problem is on the main page. When you click on the "Previous entries" link it goes to /page/2/ but loads the same entries as page 1. This continues on if you keep clicking the "previous entries" link.

    I'm running 1.5.2 with the Kubrick theme. I've played with the CSS, but the Kubrick files are basically untouched. Anyone had this happen?

  13. HansD
    Member
    Posted 8 years ago #

    I'm having the same problems with the next and previous links on a category page. Does anyone know a solution?

  14. timweber
    Member
    Posted 8 years ago #

    RichardF has described my situation perfectly. I'm running WP 2.0.2 on a Windows 2003 server. The only difference is in the format of the permalink structure I'm using:

    /index.php/%year%.%monthnum%.%day%/%postname%

  15. timweber
    Member
    Posted 8 years ago #

    P.S. My monthly archives exhibit the same behavior (i.e., the year and month -- e.g., /2006/02/ -- are left out of the URI generated for the Previous and Next links).

  16. micasuh
    Member
    Posted 8 years ago #

    Has anyone ever found a solution to this problem? I have the same one and none of these posts have come up with a solution.

  17. Stephane
    Member
    Posted 7 years ago #

    I got the same problem... Anyone found a solution?

    Thanks

    Stephane

  18. Gabismo
    Member
    Posted 7 years ago #

    I have solved the problem... ;)

    1. Open the file: /wp-includes/template-functions-links.php

    2. Search the line:

    $qstr = wp_specialchars($_SERVER['REQUEST_URI']);

    and replace it with:

    $qstr = $_SERVER['REQUEST_URI'].wp_specialchars($_SERVER['PATH_INFO']);

    Now the pagination is correct in index, archives and categories. One night to fix it. ;)

    PD: Please, if anybody can help me to delete duplicated and very similar posts with a plugin or a SQL Query let me know it in this topic: http://wordpress.org/support/topic/94567

    AdiĆ³s!

Topic Closed

This topic has been closed to new replies.

About this Topic