1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Change no. of messages per page cause bad links?

Discussion in 'Troubleshooting and Problems' started by Mr Lucky, Feb 4, 2016.

  1. Mr Lucky

    Mr Lucky Well-Known Member

    I just found a bad internal link due to page number in the URL. The post exists but the correct link has a different page number (presumably at some time I changed number of messages per page.

    I thought that the actual post ID at the end of a URL was like a permalink, and would redirect to the post whatever page it is on.

    is this supposed to be like that, seems a bit odd
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That is normal. Changing the posts per page will break some of the old paginated URLs.

    The anchor links (#post-123456 at the end) are not permalinks. A permalink to a postid would look like this:

    http://www.domain.com/posts/123456/

    This "posts" route is used in some areas like in "last post" links, but it always functions to redirect to the anchored form.

    The moral is don't change your posts per page after going live.
     
  3. Mr Lucky

    Mr Lucky Well-Known Member

    But does it have to be like that I wonder? With the site live both I and my mods have liked to experiment with posts per page in line with what our members like.
     
  4. CyclingTribe

    CyclingTribe Well-Known Member

    I've just hit this problem (or rather it has just come to light many months after changing the posts-per-page).

    Why does the post link include the page number? Shouldn't it just point to the post ID e.g.; http://yoursite.com/posts/828374 ?

    Also, how do you go about finding all the broken links? :eek:
     
  5. dethfire

    dethfire Well-Known Member

    My permalinks have the page numbers in them. I can't change # of posts now.
     
  6. dethfire

    dethfire Well-Known Member

    That is a design flaw, especially when there is no footnote explaining that.
     
    CyclingTribe likes this.
  7. Pierce

    Pierce Active Member

    Maybe this should be a suggestion to change the link to posts/postid. Instead of the current way?
     
    Mr Lucky likes this.
  8. CyclingTribe

    CyclingTribe Well-Known Member

    I'm still working my way through 11,000 links to "fix" them, it's slow going! :LOL:
     

Share This Page