Skip to:

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#3892 closed defect (bug) (no action required)

404 - File or directory not found

Reported by: kwgagel's profile kwgagel Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Settings Keywords:


I started seeking help for this on the support forum, then when I found the source of the problem I reported it as a bug their ticket system.

They told me I needed to go to Buddypress... so, I'm reporting it here now.

We are running Wordpress using multiuser with Buddypress. Users are getting the 404 error after they click the save button in their settings.

I'm opening this ticket to report the source of the problem.

Wordpress 3.x Buddypress 1.5 Windows 2008 R2 (IIS 7.5)

Themes installed are all Buddypress compatible and all themes seem to be affected. All option pages are affected. Settings are updated when the user returns to the page - despite the error. A screen shot of the error can be seen at

The source of the problem appears to be in the wp_get_referer() function on line 164 in options.php. With the variables passed to the function it should redirect the user to the page they just submitted when they updated options. Instead they get the 404 error.

The page they're redirected to appears to be the absolute path of the submitted page appended to the absolute path again (minus the domain). So it looks like this: userblog/wp-admin/userblog/wp-admin/options-general.php?settings-updated=true

When I switch out the wp_get_referrer() function with the variable $parent_page then the redirect worked as expected.

I'm uncertain about leaving it like this as my change may have introduced issues elsewhere...

This issue is discussed at

This issue was reported as a bug report at

Change History (11)

#1 @r-a-y
12 years ago

  • Keywords has-patch removed
  • Resolution set to invalid
  • Status changed from new to closed

I don't believe this is a BuddyPress issue.

You reference /wp-admin/options.php and specifically wp_get_referer(). If that function is false and no fallback URL is specified (like in /wp-admin/options.php), you'll get the 404.

I see that you're using Firefox. This could also be the problem.

View my reply to the following ticket and see if it's applicable to you:

#2 @kwgagel
12 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

Thanks for looking into this. His issue is that "The wp_get_referrer() function can return false, which it is doing in this case, and that's why the blank page shows up." which results in a blank page whereas my issue is that the url gets munged up with a repetition of the URL. While he is getting nothing returned in the wp_get_referrer() I'm getting a partial path that gets appended onto current pages path. The result is as I indicated in the ticket above where the wp-admin directory is appended again to the path that the page is on - the net result of which is that the page cannot be found... So, no, there is nothing in that ticket that helps me out. Any other suggestions?

#3 @r-a-y
12 years ago

So when you deactivate BuddyPress, the wp_get_referer() issue goes away?

#4 @kwgagel
12 years ago

How do I go about deactivating BuddyPress?
What will happen to existing blogs that use a BuddyPress template when I do?

#5 @kwgagel
12 years ago

I'm getting help from the WordPress bug tracking site now. You might want to view to see where their going.

#6 @kwgagel
12 years ago

Found where to deactivate it. Tried it but then nothing showed up on the root blog so I can't do that...

#7 @DJPaul
12 years ago

  • Keywords dev-feedback removed

"Users are getting the 404 error after they click the save button in their settings."

WHAT settings? Settings for their site inside wp-admin, the "General Settings" screen? If so, that's why r-a-y has asked you to deactivate BuddyPress to see if the problem goes away. You'll need to switch your theme back to twentyten or something first, then go back to General Settings and try to see if the problem still occurs.

If it is still broken, it is a WordPress bug and we'll close this ticket. Otherwise, it's BuddyPress conflicting with something, which we'd need to fix.

#8 @kwgagel
12 years ago

Any user setting will trigger the event as described above.

#10 @r-a-y
12 years ago

  • Resolution set to invalid
  • Status changed from reopened to closed

Closing. Thanks mercime!

#11 @johnjamesjacoby
12 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.