Skip to:
Content
Pages
Categories
Search
Top
Bottom

New subnav item leads to 404, but only in group

  • @kkjdroid

    Participant

    The user version works perfectly. The group version correctly removes the existing tab and adds a new one, but the new tab leads to a 404 page when clicked. I was able to replicate on a fresh Docker install of WordPress 6.5.4 and BuddyPress 12.5.0 with no other plugins (besides the one I’ve made, which is one file) and the Twenty Twenty-Four theme. Thanks in advance for any help.

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

    Participant

    My plugin (forum won’t let me post it directly): https://pastebin.com/FR6CGk0Y

    @koka777

    Participant

    Hello @kkjdroid. I’m not sure I understood you correctly. Still, I made some changes, try it.
    https://pastebin.com/FR6CGk0Y

    @kkjdroid

    Participant

    Thanks, but that has the same result, a “Page Not Found” when clicking the “Change Group Photo” tab under “Manage”.

    @kkjdroid

    Participant

    OK, I solved it, after way more effort than should be required. You have to set the subnav item’s screen_function to ‘groups_screen_group_admin’, then add a hook to ‘bp_screens’ that checks for your tab name and returns if not found, then hook your actual HTML to ‘bp_after_group_home_content’.

    https://pastebin.com/7h3rRLJd

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘New subnav item leads to 404, but only in group’ is closed to new replies.
Skip to toolbar