Support

export-user-data 0.9.3 doesn't export Buddypress fields

Our Support Desk is where our clients and community come together to find solutions.

Answered
0
0

I upgraded from export-user-data version 0.7.3 to 0.9.3 and I noticed that the Buddypress Extended Fields were no longer exported, and php logged an error about: “Undefined property: BP_XProfile_Component::$table_name_data”.

I compared the two versions and found the new one does:

add_action( 'init', array( $this, 'generate_data' ), 1 );

instead of:

add_action( 'init', array( $this, 'generate_data' ) );.

I changed that back and it works correctly, at least on my site, now. I would have thought the right thing to do would have been to check if buddpress was active and in that case use bp_include instead of init, but that didn’t work when I tried it, perhaps I was missing something else. I think for this plugin to load in the proper order for everyone, that bp_include would be the right thing to do, if you could get it to work see http://codex.buddypress.org/plugindev/checking-buddypress-is-active/

This is on Wordpress 3.9.1, Commons in a Box 1.0.7, Buddypress 1.9.2

  • Ray
    Hey - the 0.9.3 update was made to fix a problem with the user bar, which was introduced due to a problem with BP 2.0... I need to do some testing, but if you get a chance, please dive in there..
  • Ray
    And please do your testing on the latest version of BP.. I don't want to end up adding legacy code to deal with different versions of BP..
  • cwjordan
    Unfortunately Commons in a Box only supports Buddypress 1.9.2 at the moment, so I'm stuck with that version. The above change makes the plugin work fine for me. I assume it doesn't work in some cases or you would not have set the add_action priority to 1 in the first place - you were trying to fix something by setting that after all. The problem is with a priority of 1 this add_action will fire before the buddypress extended profile code, so BP_XProfile_Component::$table_name_data won't exist yet and your call to BP_XProfile_ProfileData::get_all_for_user fails (at least on my system).
  • cwjordan
    Anyway if it does work with the latest version of BP that's okay, since Commons in a Box will get up to that version some day. The above fix works fine for me for now.
  • Ray
    Odd issues - reverting to the default priority allows the BP export to run - I get a bunch of DB errors, but nothing fatal - and the userbar is no longer hidden.. I need to investigate further before releasing this as a patch...
  • You must to post comments
Best Answer
1
0

Ray,

Version 0.9.4 fixes this problem, thanks!

  • Ray
    Thanks for following this up - Q
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Why not Search Our Work or Get in Touch