Skip to:
Content

Opened 4 years ago

Closed 4 years ago

#1859 closed defect (bug) (invalid)

undefined functions when hooking a function returned by ajax.

Reported by: windhamdavid Owned by:
Milestone: 1.2 Priority: major
Severity: Version:
Component: Keywords:
Cc:

Description

functions return undefined when hooking into a function returned by ajax
http://buddypress.org/forums/topic/call-to-undefined-function-bp_activity_update_meta

Change History (2)

comment:1 johnjamesjacoby4 years ago

I have a feeling we will need a do_action( 'bp_ajax_init' ); somewhere...

comment:2 apeatling4 years ago

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

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 as well as BuddyPress. Basically exactly how all ajax is done in bp-default.

Note: See TracTickets for help on using tickets.