Skip to:
Content
Pages
Categories
Search
Top
Bottom

Any way to eliminate redundancy/weirdness in permalinks (i.e. “forums/forum”)?

  • I’m in the process of converting a standlone BBpress 1.1 installation into the 2.02 plugin version (well, really, recreating it from scratch in the plugin version, because the importer apparently doesn’t work if your blog actually has any users or content).

    And I’ve run into a problem – the default permalink structure for the BBpress plugin is really bizarre. It adds a “forums” slug for the forums area, which is fine and to be expected, but then it also insists on adding an additional “forum” slug before the name of each forum, so that instead of a normal URL like example.com/forums/announcements, you get example.com/forums/forum/announcements, which looks weird and awkward. I tried just removing the forum slug, but that left a double slash in the URL, which my web browser then reduced to a single slash, resulting in a 404 error.

    And for posts within forums, instead of the sort of URL you would normally expect – i.e. for a post in the announcements forum, something like example.com/forums/announcements/welcome, or example.com/forums/announcements/12345 or whatever, you have example.com/forums/topic/welcome – there doesn’t appear to be any way to associate the posts with the actual forum they’re in.

    Is there any way to fix this? Obviously the “forums/forum” thing is the most important – having the completely useless “topic” slug in the post URLs is annoying and pointless, but the “forums/forum” thing makes it look like I was drunk when I set the forums up or something – I really can’t let it go live with a glitch like that in the URLs. But I’d like to fix the topic issue too if possible. Any ideas?

Viewing 25 replies - 51 through 75 (of 85 total)

  • Pascal Casier
    Moderator

    @casiepa

    Hi siparker,

    I won’t start about your first line about the ‘money’, but for adding new functionalities of finding code for existing tickets, https://bbpress.trac.wordpress.org is one of the places that can be used for that. If a ticket is there and there is code attached, it makes a fair chance to be added into future versions.

    Pascal.


    siparker
    Participant

    @siparker

    Ok, so if i can find someone to do the work and get the urls fixed then submit the code into trac it might get integrated into the core by someone in the future?

    I understand about the money thing also. I am just trying to think of a way to kickstart the development on the platform again as its on its way to being a really good forum software. it has almost all of the basics covered and some great plugins too. its just those few bits that mean it cant be used by some people. I would love to see bbpress be the defacto choice over phpbb or vbulletin and thought if i could sponsor the development then perhaps it might encourage a valuable dev to get more involved?


    siparker
    Participant

    @siparker

    the Trac ticket that was opened for this is Here
    https://bbpress.trac.wordpress.org/ticket/2258
    It is 3 years sold and was moved to a future release to wait for the WordPress Permalinks page to be using the settings API, so that these settings were not under the forum page.

    Not quite sure putting off a fix of this type for 3 years so you can make it appear in a different page is really a good idea but that’s where we are now.

    Can it be moved back from a low priority? This is really a high priority for me / anyone wanting to use bbpress for a forum where URLs already exist and need rewriting, or for good SEO URLs.

    @robkk


    siparker
    Participant

    @siparker

    @casiepa
    Do you think i should just gather any info i can and assign to the trac ticket?

    The solution posted a bit further up the thread by @_az_ does the basics of removing the forum slug but as he mentioend there are a few places where the permalinks are claled like breadcrumbs etc

    From what i can find out (i am not a programmer but am trying) for a quick fix we would need to get the forum parent id from the post itself then get the slug for that forumid and any parents it has. then the post permalink is built from the parent slug and the post slug.

    This needs to hook into the permalink function to override this and there is a good example (for a different purpose) here https://github.com/korobochkin/bbpress-permalinks-with-id which i think covers off all of the different places that the changes need to be made and could possibly be used as a basis for the new plugin / code.

    I am happy to do all the testing and research if anyone is able to provide some coding experience to the mix. please just get in contact with me and i will show you everything i have found so far. then we can publish the code into the trac ticket and hopefully the main devs can put this into core.

    If anyone has any ideas on blocking issues for this also please tell me.

    I know one of the potential issues and the reason for this structure in the first place was duplicated urls. Could anyone please explain the thinking behind this. and how it might present an issue.

    I know the current topics post type wont alow duplicates so the only issue i can see would be if the forum name was the same as a topic name. Is that the only time this might happen?

    If so we would need to create a check when saving the url/permalink that a forum post type does not have the same permalink and if it does then add 1 to the end?

    The way most other forums do this is by appending the thread id into the permalink so it would appear to be /my-friendly-title-11234 for example where the post id is 11234

    not saying bbpress should do this but its an option as the id for the post is available.


    Pascal Casier
    Moderator

    @casiepa

    Hi @siparker,
    If you have any info and a trac ticket is already there, then I would say add it there, yes !
    I know that @netweb will be checking this also when dealing with Permalinks.

    Thanks,
    Pascal.


    siparker
    Participant

    @siparker

    @casiepa. ok ill sumamrise all i know there then. thanks for the feedback


    _az_
    Participant

    @_az_

    @siparker thanks for posting the link to the Permalinks with id plugin. I have looked into it and the logic for adding text to a permalink seems less complicated than the logic for replacing parts of the permalink.

    However, good news may be: it is possible that i will work on that feature for a client.

    Probably not the full scope of https://bbpress.trac.wordpress.org/ticket/2258 but it may be a good start.

    If this is decided, then i’d like to propose its development on github as an public bbpress-plugin and i’d happily collaborate with other devs on the issue.


    siparker
    Participant

    @siparker

    @_az_ I am happy to do whatever I can. have you set up the GitHub repo or shall i do it and add the necessary people?

    If you need any further research into any variables or testing to see results etc please just tell me and i will find all the info i can.


    _az_
    Participant

    @_az_

    So, small update from me:

    Unfortunately other priorities came up with my client, so i don’t expect to be able to put much time into developing. This was decided this yesterday and i am still considering implementing the feature in my free time.


    Herve ARNAUD
    Participant

    @herve-arnaud

    Happy to see that bbPress team start to think about fixing this HUGE problem… which makes bbPress almost useless if you’re a bit concerned by the experience you provide to your users, by the crawling and indexation problematic, by the semantic architecture of your website and by the search engine optimization.

    This fix could be a “game changer”.

    I don’t have abilities for helping the community on that part, but I deeply encourage everyone who take this challenge.


    siparker
    Participant

    @siparker

    Here you go

    http://www.coffeeblack.co.uk/wp-content/uploads/2016/04/bbpress-vbulletin-permalinks-1.zip

    for now it just basically replicates the permalinks that I have in Vbulletin but it puts the threads into their parent forums etc

    You are welcome

    Please post any changes here and ill setup the github properly so it can be updated there.

    Mods admins etc please see if you can integrate this as an option in the core.

    @siparker This is awesome, thank you πŸ™‚

    Could you set this up in a GitHub repo please, I’ve got a few change suggestions πŸ™‚


    siparker
    Participant

    @siparker

    @netweb

    https://github.com/siparker/bbpress-vbulletin-permalink

    Also i was reading yesterday about the bbprewss changes due for the next version.

    will the changes affect this rewrite set? i see bbpress replies as comments?

    will the changes affect this rewrite set? i see bbpress replies as comments?

    No, for bbPress 2.7 yes, but not for bbPress 2.6


    siparker
    Participant

    @siparker

    ok. so will this be defunct then or will i need to update it? or can you build this into core?

    Just want to know to see what i will need to pay attention to in the future.

    and looking forward to your pull request (what a nerdy thing to say)

    I need to take a closer look, and I’m exhausted today, so hopefully over the weekend I’ll get a chance to take a look and make said nerdy pull request πŸ˜‰

    Based on said closer look I can start to think how we might integrate it into core and go from there


    siparker
    Participant

    @siparker

    ok cool have a good rest and ill look forward to your feeback.


    nateonawalk
    Participant

    @natesirrah

    @siparker you are a godsend! I’ll have to test this tonight, but I’m hoping to be one of the first new bbPress forums to proudly be using pretty, SEO-friendly permalinks. Thank you!!


    nateonawalk
    Participant

    @natesirrah

    Had a chance to test this out locally. The URL re-writes work like a charm, without any conflicts.

    @siparker @netweb The plugin works almost perfectly, BUT there is still one big issue — by adding -postIDs to the end of Forum and Category URLs (mysite.com/forums/category-name-postIDstring) or (mysite.com/forums/category-name/forum-name-postIDstring), we’ve defeated the SEO purpose of re-writing these URLs.

    For authority to be passed allll the way down to the topics, we need for the forums and categories’ permalinks to live without these -postIDs. That way, (mysite.com/forums/category-name/forum-name/topic-name-postIDstring) can get the full trickle down benefit from any links /category-name/ and /forum-name/ receive.

    I’m going to play around with the plugin code to see if I can just rip the right bit out! Thanks again!

    EDIT: So removing .'-f' .$post->ID from lines 50 and 60 fixed the URLs in the CMS BUT broke the page. It seems like the plugin relies on the postIDs to associate the new URLs with the old URL structure? If so, how can we achieve this without actually using the postID in the URL?


    siparker
    Participant

    @siparker

    Hi @natesirrah

    please explain the

    “For authority to be passed allll the way down to the topics, we need for the forums and categories’ permalinks to live without these -postIDs. That way, (mysite.com/forums/category-name/forum-name/topic-name-postIDstring) can get the full trickle down benefit from any links /category-name/ and /forum-name/ receive.”

    bit please. I am not sure what you mean here.


    siparker
    Participant

    @siparker

    I replied on github. with the answer


    nateonawalk
    Participant

    @natesirrah

    I replied too! Would love to hear others’ opinions too πŸ™‚ @siparker @netweb.


    nateonawalk
    Participant

    @natesirrah

    Hello bbPress community,

    I’ve forked @siparker ‘s plugin and have worked with a dev to develop an edited version

    the new version:

    – only includes post IDs at the end of topics
    – moves the topic IDs to the end of the URL for URL prettiness
    – makes it so that every page only has one path (important to prevent negative SEO duplicate content vulnerabilities)
    – works with breadcrumbs and edit post links too

    I’m doing a final debugging right now, but I’ll publish the code on GitHub once it’s polished and then will share a ZIP here.

    @netweb, would love to help work toward getting this implemented in core functionality πŸ™‚

    Hi,
    Instead of sharing the zip, just put the link to GitHub please, but great work !
    Pascal.


    nateonawalk
    Participant

    @natesirrah

    Hey all, an update —

    Sooo this project turned into something much larger than anticipated. What seemed like a quick PHP permutation turned into a massive 100 hours+ job that is still ongoing. We’ve effectively created a complete out-of-the-box pretty permalinks solution that even folks with pre-existing bbPress forums will be able to safely turn on and use. We’ve thrown out the previous fork and are re-writing everything with our own code from scratch.

    That said, the opportunity cost I’ve incurred is quite large and we’re still a couple weeks off from completing things. Every time we do a re-write, a bunch of new broken use-cases emerge. We’ve gotten offers from a couple plugin development companies to buy the plugin from us as well — so we’re trying to decide what best to do with the resources that we have.

    Just want everyone to be aware of progress!

    Thanks~

Viewing 25 replies - 51 through 75 (of 85 total)
  • You must be logged in to reply to this topic.
Skip to toolbar