WordPress.org

Ready to get started?Download WordPress

Forums

Usernoise modal feedback / contact form
[resolved] admin-ajax.php showing 0 not working for non-admin (11 posts)

  1. rconserta
    Member
    Posted 1 year ago #

    I have the latest versions 3.0.6 and 3.0.9 with wordpress v3.4.2 and I get access denied for all non-admin logged in users. When I access the admin-ajax.php file in my browser I get a 0, From what I read I'm suppose to get a -1 or something, but I don't get it. How do I make the admin-ajax.php file accessible by the public? What am I doing wrong?

    http://wordpress.org/extend/plugins/usernoise/

  2. karevn
    Member
    Plugin Author

    Posted 1 year ago #

    As far as I remember, you already emailed me that it was not about Usernoise :)

  3. rconserta
    Member
    Posted 1 year ago #

    No that wasn't me. I didn't email you. I also wanted add that my urls in general settings match, so that isn't the problem either.

  4. rconserta
    Member
    Posted 1 year ago #

    Is there any way I can use this plugin without allowing wp-admin access to users? When I allow wp-admin access to all users usernoise works, but I would rather just allow the admin-ajax.php file and nothing else.

  5. rconserta
    Member
    Posted 1 year ago #

    I found this:

    So, if you want it to fire for both visitors and logged-in users, you can do this:
    
    add_action('wp_ajax_my_action', 'my_action_callback');
    add_action('wp_ajax_nopriv_my_action', 'my_action_callback');

    on this page: http://codex.wordpress.org/AJAX_in_Plugins

    Can I add this somewhere in your code to get it to work?

  6. karevn
    Member
    Plugin Author

    Posted 1 year ago #

    Hello! You can only allow wp-admin/admin-ajax.php to be publicly accessed (not all the wp-admin folder - that is all Usernoise needs. I dont really like the decision to use admin-ajax.php, but after considering other ones, it is best (other ones are less reliable).

  7. rconserta
    Member
    Posted 1 year ago #

    I've read a lot of other places about you saying that you need to allow wp-admin/admin-ajax.php to be publicly accessed without having the entire admin folder accessible, but you never say HOW to make only the admin-ajax.php file accessible. Can you please tell me how I would do this? I changed the permissions of the file to 775 and 777, it didn't work, and like I said I get a 0 when I access the file in a browser, but usernoise still will not work for logged in users only admins. Please tell me how to make only the admin-ajax.php file publicly accessible.

    It's a shame that you couldn't figure out another way, this is an awesome plugin for wordpress.

  8. karevn
    Member
    Plugin Author

    Posted 1 year ago #

    How did you close wp-admin from public access?

  9. rconserta
    Member
    Posted 1 year ago #

    Through my theme, I use classipress and there is an option to clos wp-admin from everyone that is not an admin.

  10. karevn
    Member
    Plugin Author

    Posted 1 year ago #

    You need to contact appthemes then, because /wp-admin/admin-ajax.php is a standard "entry point" for ajax calls in WordPress which is used by other plugins too, and it should be available for public access.

  11. dhakad
    Member
    Posted 6 months ago #

    I have problem similar to this, when i click on AJAX tag in new plugin it shows "An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums."
    Other tags are working fine....

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.