Search code examples
ajaxwordpresshttp-status-code-404buddypress

AJAX 404 with results using BuddyPress


On my development machine everything works fine. On the live server (Godaddy), the AJAX requests from BuddyPress are returning results and a 404 error in FireBug. But the script is seeing the results as a fail and the indicators continue to spin.

Example: http://jobaru.com/ on the homepage there is Newest | Active | Popular under memebers using the AJAX as well as the letters on the groups page.

Things I have tried: Double checked the file was actually there first, checked permissions to be able to read. Did a fresh install.

Any ideas on why it would return 404 header and valid response?


Solution

  • I don't know why it returns 404, but try adding this line of code to /wp-content/plugins/buddypress/bp-core/bp-core-ajax-handler.php before do_action()

    status_header( 200 );
    

    I'm running a heavily modified version of BuddyPress 1.0 RC1, and intercept the ajax posts in bp-custom.php, but setting the status header in the custom file before I did my own logic worked just fine for me.