Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am doing an request for a plugin. This works fine, on my testplatform (regular WP), but it makes problems on a WPMU (both latest wp versions.) This is my function:

function my_action_callback() {
$post = $_POST['shortcode'];
$post = str_replace('\"','"',$post);    
echo do_shortcode($post);
die(); 
}

Whatcould be the issue?

share|improve this question
add comment

1 Answer

When an ajax call returns 0 this usually means that you do not have your actions set up correctly. You will want to make sure that you are hooking into wp_ajax as well as wp_ajax_nopriv

add_action( 'wp_ajax_ACTION', 'your-callback' );
add_action( 'wp_ajax_nopriv_ACTION', 'your-callback' );

I would guess that the problem is that you are only hooking into wp_ajax and are logged in on your dev installation and you are not logged in on the live install. Just guessing here. Would have to see all of the code to know for sure.

share|improve this answer
    
nope. It is a Plugin. The ajy call is done in the backend. So I need to be logged in. To be more precious: The call is done in a tinymce dialog box. –  Lisa Jul 1 '11 at 9:45
1  
This part is still true though: "Would have to see all of the code to know for sure." –  mfields Jul 2 '11 at 0:00
    
Hi the problem seems to be the WPMU install. The function does not route to any specific blog... –  Lisa Jul 2 '11 at 16:52
1  
@mfields Dunno about the question poster, but you're answer helped me man! :D –  Rutwick Gangurde May 31 '12 at 11:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.