Skip to:
Content
Pages
Categories
Search
Top
Bottom

Problem / in Permalinks

  • @ricsca2

    Participant

    If Permalinks aren’t set with / at the end of /%postname%/ but, for example, /%postname%.html, even though it doesn’t actually affect the BuddyPress URLs, only the posts and pages, when navigating the forum tabs, the / is missing and the URL is broken.
    For example: to see a user’s replies, the URL is
    /members/ricscaforums/replies/
    and not
    /members/ricsca/forums/replies/

Viewing 4 replies - 1 through 4 (of 4 total)
  • @emaralive

    Moderator

    For the sake of clarity, are you stating that you are setting your permalink structure to /%postname%/.html as opposed to /%postname%/?

    @ricsca2

    Participant

    /%postname%.html
    I’m importing an old site that had parmalinks like maysite.com/name-article.html, so I set the parmalinks to /%postname%.html.

    But now, since buddypress doesn’t have a / after the %/, it’s breaking the forum tab URLs, even though the buddypress links don’t contain the .html because they don’t follow the custom parmalink rules.

    @ricsca2

    Participant

    I solved it with chatgpt which had made me a plugin to put .html also in the forum (which like buddypress does not depend on the parmalinks that are set on wp).

    @emaralive

    Moderator

    Apparently, this is the current behavior of the bp_rewrites_get_url() function, i.e., the missing trailing slash, when the permalink structure is missing a trailing slash. Hence, a permalink of /%postname%/.html will result in a URL with a missing trailing slash, e.g.:

    
    site.url/members/<user_name>
    

    This causes a 404 error when bbPress tries to concatenate the URLs for the following:

    • Replies Created
    • Engagements
    • Favorites
    • Subscriptions

    What’s peculiar is that “Topics Started” isn’t affected because, for bbPress, all member area URLs (navigation links) are based on either the bp_displayed_user_domain() or the bp_loggedin_user_domain() functions and both of these functions have the bp_rewrites_get_url() function in the chain for return.

    Regardless, this appears to be problematic due to some 3rd party themes and plugins that make use of various other BP functions that have bp_rewrites_get_url() function in the chain for return.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar