Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP 2.8.0 Update Broke Profiles


  • leewells
    Participant

    @leewells

    Sorry, you are not allowed to access this page.

    Is now thrown when the admin tries to edit any xprofile field.

    I’ve taken the following steps:

    1) Disabled theme
    2) Disabled all plugins

    The problem persisted which likely means there was an oops in the release.

    If it helps the site is multisite (just in case it can’t be replicated on a single-site)

Viewing 11 replies - 1 through 11 (of 11 total)

  • danbp
    Participant

    @danbp

    Hi,

    please read this:

    BuddyPress 2.8.0 “San Matteo”


    leewells
    Participant

    @leewells

    please read this:

    If you wanted to be superman for a day all you had to do was ask! 🙂 Thanks danbp!


    leewells
    Participant

    @leewells

    Actually, that brings me to another issue it seems…

    Call to undefined function xprofile_get_field_data()

    Did that function change? I’m currently using it on a steam community website to pull steam ID’s so I can poll steam and display a stream widget on the user’s profile page.


    shanebp
    Moderator

    @shanebp

    You’re probably calling xprofile_get_field_data() too early.
    Wait until BP is loaded, use the bp_ready hook.


    leewells
    Participant

    @leewells

    So… make sure this is right…

    function doProfileStuff()
      {
      echo xprofile_get_field_data('stuff');
      }
    
    add_action('bp_ready', 'doProfileStuff');

    I guess the question is “how” to hook into it or do you use bpready directly in place of add_action ?

    May I ask for an example.. If I see how it is used, I can run with that being as there seems to be slim documentation on how bp_ready is used.


    shanebp
    Moderator

    @shanebp

    You need to pass additional fields – and in the correct order.
    http://hookr.io/functions/xprofile_get_field_data/


    leewells
    Participant

    @leewells

    This is what I have (I shorted the above code as an example of how to hook into bp_ready)

    	function executeSteamID()
    		{
    		$steam64id 		= xprofile_get_field_data('Steam64 ID', get_current_user_id());
    		$steamUser 		= xprofile_get_field_data('Steam User', get_current_user_id());
    		$steamCache 	= xprofile_get_field_data('Steam Cache', get_current_user_id());
    
    		// we now do stuff with the above data.. then echo it
    		}

    How would I hook into bp_ready in that situation?

    ** Yes I’m shamelessly using a hidden xprofile field to store cache data 😛


    shanebp
    Moderator

    @shanebp

    Use the same hook in the same way as you did above.


    leewells
    Participant

    @leewells

    Nope. The hook does work, because profiler says the function is called later now, but the function still doesn’t seem to exist and throws the undefined function exception.

    Also, other plugins do as well including gears which is used by theme authors such as myself for allowing users to easily add elements to a website from buddypress.


    shanebp
    Moderator

    @shanebp

    Does the profiler show that BP is loaded before you call your function?
    If not, then it will fail.

    Try placing your function in bp-custom.php


    leewells
    Participant

    @leewells

    Thanks Shane! I’ll give this a shot when I get back to home this evening and let you guys know how it works out. I’m afraid the little profile I made doesn’t do any sorts of compares, it just lets me know if it is loaded before or after certain other hooks like init, the_content and such.. I’ll have to reopen that and add bp_load and get a better idea of where it loads to buddypress though.

    My I make a request, though, developer to developer 😛 This seems to have broken a lot of plugins and I like to say I follow the methods of WordPress to the letter without getting hacky :P. If changes like this are made, can we still preserve a method of backward compatibility? The profile info, for instance shouldn’t matter much when it loads, so long as the BP class is loaded, which means, I guess what I’m saying is I’m drawing a blank to what it would be that would require the xprofile fields to be dropped to such a low load order that it doesn’t initialize with the plugin class init.

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Skip to toolbar