#3647 closed defect (bug) (fixed)
bp_forum_permalink() is missing a ’/’ (malformed)
Reported by: | Grimbog | Owned by: | |
---|---|---|---|
Milestone: | 1.5.1 | Priority: | normal |
Severity: | normal | Version: | 1.5 |
Component: | Forums | Keywords: | |
Cc: |
Description
Someone posted this on the buddypress forums the other day, but I don't think its been submitted here. Fairly critical bug as users are unable to navigate back to the specific forum from a posted topic.
---
At the top of the group_name/forum/topic/new-topic-in-the-forum/ page
there are two buttons: ? Back to Main Forum Group Forum Directory
But when I click on the Back to main forum button i get a malformed URI
It looks like this:
http://dev.resourceclips.com/groups/jayden-resources-ltdforum//
instead of
http://dev.resourceclips.com/groups/jayden-resources-ltd/forum/
Any ideas?
Thanks in advance
Change History (5)
#2
@
13 years ago
- Component changed from Core to Forums
- Milestone changed from Awaiting Review to 1.5.1
- Severity changed from critical to normal
#3
@
13 years ago
You're right that the link is being created incorrectly. We do need to add the slash.
However, it's worth noting that bp-default, in BP 1.5, does not actually use this function at all (for whatever reason). It'll called in bp-themes/bp-default/forums/single/forum-header.php, which isn't actually called at the moment (the logic in bp_forums_screen_single_topic() never returns true).
Also, trailingslashit() should not be allowing double-slashes. See http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/formatting.php#L1170
Further to my post above - I have managed to create a quick fix, but this will need to be submitted to the repository.
Essentially, the permalink wasnt forming properly as it was missing a forward slash before 'forum' on line 1326 of bp-forum-template.php. Also trailingslashit(); was being run twice, which causes two forward-slashes.
My fix is below...
Grimbog
---