Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 12 years ago

#3873 closed defect (bug) (fixed)

XMLRPC error

Reported by: lancehudson's profile lancehudson Owned by:
Milestone: 1.6 Priority: normal
Severity: normal Version:
Component: Core Keywords:
Cc:

Description

On 1.6 bleeding (5577) getting

<br />
<b>Notice</b>:  Trying to get property of non-object in <b>C:\Development\www\WordPress-Dev\wp-content\plugins\buddypress\bp-core\bp-core-loader.php</b> on line <b>170</b><br />

preventing xml-rpc clients from working. In my case turning off notices isn't an option.

Attachments (3)

bp-core-loader.php.patch (520 bytes) - added by lancehudson 12 years ago.
bp-loader.php.patch (352 bytes) - added by lancehudson 12 years ago.
Replaces bp-core-loader.php.patch
3873.03.patch (538 bytes) - added by boonebgorges 12 years ago.

Download all attachments as: .zip

Change History (13)

#1 @lancehudson
12 years ago

Added, patch, feels like a hack though. Anyone know what implications it may have?

#2 @DJPaul
12 years ago

Or, since we don't expose any of our API via XMLRPC, we could just not load BuddyPress in such situations.

#3 @lancehudson
12 years ago

I like that better too.

@lancehudson
12 years ago

Replaces bp-core-loader.php.patch

#4 @lancehudson
12 years ago

Hows that? I didn't like putting it in the contructor.

Last edited 12 years ago by lancehudson (previous) (diff)

#5 @boonebgorges
12 years ago

  • Milestone changed from Awaiting Review to 1.6

I think it'll be easier to keep track of the cases where BP shouldn't load (XML-RPC may not be the only one) if we do it in the constructor.

#6 @boonebgorges
12 years ago

  • Keywords reporter-feedback added

You know, the more I think about it, the more I'm nervous about simply killing BP on XMLRPC requests. There could be folks out there who are taking advantage of it, even though it's not an official use. (Not sure how, of course, but it's possible that someone has hacked something together.

lancehudson, can you test 3873.03.patch to see if it's enough to fix your problem? It's a much less broad changed.

#7 @lancehudson
12 years ago

I will test it, few minutes.

#8 @lancehudson
12 years ago

  • Keywords reporter-feedback removed

Works

#9 @boonebgorges
12 years ago

Gracias amigo :)

#10 @boonebgorges
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [5592]) Ensure that bp->loggedin_user->id has a fallback value, for when the current_user global is not available, such as during XML-RPC requests.
Fixes #3873.
Props lancehudson for the initial patch

Note: See TracTickets for help on using tickets.