Skip to:
Content

bbPress.org

Opened 14 years ago

Closed 14 years ago

#1210 closed defect (bug) (worksforme)

Previous topics page link with permalinks

Reported by: hatter's profile hatter Owned by:
Milestone: 1.1 Priority: high
Severity: major Version: 1.0.2
Component: Front-end Keywords:
Cc: nightgunner5@…, kevinjohngallagher

Description

When using name based permalinks, the Previous page link does not work and instead links to the current page. The user was using a subdomain of http://forum.uptownelite.com for their forum, and because of the $empty_format = "", the href would be generated blank and always link to the current page. The bb_paginate_links function in bb-includes\functions.bb-core.php has $empty_format = ""; set, but the bb_options('mod_rewrite') should be checked and if set, $empty_format = 'url_of_forum'; should be used in this case to point the first page back to the root of the forum. In this user's case, it could be '/', but others use a subdirectory of /forum/, which should be used. So, if the mod_rewrite option is set, then the forum root directory should be set for $empty_format (I think).

Attachments (1)

1210.patch (748 bytes) - added by Nightgunner5 14 years ago.

Download all attachments as: .zip

Change History (9)

#1 @hatter
14 years ago

  • Version changed from 1.0.1 to 1.0.2

Crap, wrong version, should be 1.0.2

#2 @Nightgunner5
14 years ago

  • Cc nightgunner5@… added
  • Milestone set to 1.0.3
  • Priority changed from normal to high
  • Severity changed from normal to major

Right problem, wrong function.

If the forum is in the root of a domain/subdomain, /page/2 is replaced with %_%, which is replaced with an empty string. Since all forums are in folders, which end with /, I think the empty format should be /, not an empty string.

@Nightgunner5
14 years ago

#3 @Nightgunner5
14 years ago

  • Keywords has-patch added

#4 @hpguru
14 years ago

Thank you to patch.

#5 @kevinjohngallagher
14 years ago

  • Cc kevinjohngallagher added
  • Milestone changed from 1.0.3 to 1.1

#6 @GautamGupta
14 years ago

  • Keywords has-patch removed

The patch does not work for me when I am on the first page of topic and hover on page 2 or 3 or etc... The link that comes is - subdomain.domain.com/topic/abcpage/1/ instead of subdomain.domain.com/topic/abc/page/1/ (I have the install on a subdomain).

#7 @sambauers
14 years ago

"/page/1" is deliberately stripped out of any permalinks to stop duplicate content at multiple URLs.

I can't replicate this problem myself and the current patch is dangerous.

#8 @GautamGupta
14 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Same here, can't replicate the problem. Closing the ticket as worksforme.

Note: See TracTickets for help on using tickets.