Skip to:
Content
Pages
Categories
Search
Top
Bottom

Call to undefined function bp_activity_update_meta()

  • Profile photo of Hempsworth
    Hempsworth
    Participant

    @hempsworth

    I’m building a plugin which adds metadata to activity items, using bp_activity_update_meta()

    Unfortunately, when I try and use that function I get a ‘call to undefined function’ error.. Any idea why that could be?

    It’s obviously defined in bp-activity.php, and I’m using the method described here to make sure my plugin is loaded after BP…

Viewing 8 replies - 1 through 8 (of 8 total)
  • Profile photo of Windhamdavid
    Windhamdavid
    Participant

    @windhamdavid

    yup.. right there line 1003? wish I could answer this myself? blind guess wp_cache_set stumbling with bp_init? ~ @JJJ – little help please.

    Profile photo of John James Jacoby
    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Hmm…

    Does your plugin use ajax? I haven’t specifically tried hooking a plugin into the ajax portion of the activity stream to know if the method of loading a plugin from the codex will work in an ajax situation.

    Profile photo of Hempsworth
    Hempsworth
    Participant

    @hempsworth

    Yes, the plugins using Ajax.. Is there any fix to get it working in an Ajax environment?

    Profile photo of Andy Peatling
    Andy Peatling
    Keymaster

    @apeatling

    It’s important to clear this up before 1.2 final, can we get a ticket in trac please? Thanks.

    Profile photo of Windhamdavid
    Windhamdavid
    Participant

    @windhamdavid

    Profile photo of Hempsworth
    Hempsworth
    Participant

    @hempsworth

    For now I’m including ‘wp-load.php’ if the plugin gets requested by Ajax, and things are working fine.

    Profile photo of Hempsworth
    Hempsworth
    Participant

    @hempsworth

    For now I’m including ‘wp-load.php’ if the plugin gets requested by Ajax, and things are working fine.

    Profile photo of Andy Peatling
    Andy Peatling
    Keymaster

    @apeatling

    You should be using the wp_ajax_ hook to run your AJAX functions and using the ajaxurl parameter in JS as the request URL. IF you do that then the WP environment should be loaded. Basically exactly how all ajax is done in bp-default.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Call to undefined function bp_activity_update_meta()’ is closed to new replies.