Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Multiple Bizarre 404 Behaviors (2 posts)

Started 5 months, 4 weeks ago by: ggandg

  • Profile picture of ggandg ggandg said 5 months, 4 weeks ago:

    I think Buddypress 404 behavior needs a little attention. Here is a sampling of what is returned with various bad addresses on my Buddypress site.

    http://mywebsite.com/groups-directory/nonexistentgroup

    Redirects to http://mywebsite.com/groups-directory/

    http://mywebsite.com/members-directory/nonexistentmember

    Returns: Fatal error: Call to a member function set_404() on a non-object in /home/myusername/public_html/wp-content/plugins/buddypress/bp-core/bp-core-functions.php on line 1459

    And finally http://mywebsite.com/nonexistentpage and http://mywebsite.com/members-directory/admin/nonexistentpage return 404 pages that are materially different, even though they run through the same 404 template (I’ve confirmed it’s running through the same 404.php file and even removed all three “do_actions” in the 404.php file with no effect).

    The first address above returns a 404 page with the following code:

    div id=”bp-before-container” class=”fullwidth”
    div id=”container”
    div id=”content”
    div class=”padder one-column”
    div id=”post-0″ class=”post page-404 error404 not-found” role=”main”

    And the second address above returns a 404 page with the following code:

    div id=”bp-before-container” class=”fullwidth”
    div id=”container”
    div id=”container”
    div id=”content”
    div class=”padder one-column”
    div class=”post page-404 error404 not-found” role=”main”

    I’m not insane. What in the world is going on here? How about a little consistency in both 404 behavior and output? Any input is appreciated… and why do backticks cause code to disappear rather than be displayed on this forum?

  • Profile picture of ggandg ggandg said 5 months, 4 weeks ago:

    FYI, BP 1.5.1 WP 3.2.1 single-site Linux

    I’m pretty experienced and I’m stumped, especially on the last part involving http://mywebsite.com/nonexistentpage and http://mywebsite.com/members-directory/admin/nonexistentpage

    In the latter, I’ve placed prominent “edit profile” links on single member profiles, and if another logged in user clicks these links for which they obviously don’t have permission to access, I want them to get a consistent “Page Unavailable/Restricted” 404 page, the same as they’d get if they tried to access http://mywebsite.com/nonexistentpage