• Resolved Stefan

    (@joamp)


    Hey Blaz,
    whenever I add the rating to a post and watch it live as a unlogged user, a notification pop up in the browser says: authentication required.

    But it does not affekt page load or something. Everything looks normal.

    Strange thing. I don’t really get where this could come from. On localhost this problem doesn’t exist.

    Security Setting “Who can rate posts” is set to “Everybody”.

    Any ideas/suggestions?

    Thanks!

    Stefan

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Blaz K.

    (@blazk)

    Hi Stefan,

    this indeed sounds strange. I’m quite sure it’s not coming from the plugin. Is it possible that some other plugin on the website outputs this notification? Also please share the link to the website so I can check it out.

    Regards,
    Blaz

    Thread Starter Stefan

    (@joamp)

    Hey Blaz,
    I did some testing and it’s definitely caused by the rate my post plugin.

    The problem emerges because I’ve a directory protection on /wp-admin.
    I’ve tested it with different sites. When I remove the /wp-admin directory protection the plugin works perfect. But when I put it back and go to a page where the rate my post plugin is included, it shows the authentication pop up as if I would go to the /wp-admin log in page.

    That’s really odd. Never had such problems because of the directory protection.

    Any idea how I can resolve this issue whitout turning off the directory protection?

    Thanks,
    Stefan

    Plugin Support Blaz K.

    (@blazk)

    Stefan,

    blocking wp-admin is not the right way to go because both front-end and back-end Ajax requests use admin-ajax.php and admin-ajax.php is located in wp-admin folder. By doing this you are basically blocking all ajax functionality for users who are not logged in. You can read more about this here: https://www.wordfence.com/blog/2014/05/please-stop-password-protecting-your-wp-admin-folder-because-it-breaks-public-ajax-for-wordpress/

    PS: you can block wp-admin but you do need to allow access to admin-ajax.php. Here you can learn how to do this (scroll to the end): https://www.wpbeginner.com/wp-tutorials/how-to-password-protect-your-wordpress-admin-wp-admin-directory/

    Regards,
    Blaz

    • This reply was modified 5 years, 10 months ago by Blaz K..
    Thread Starter Stefan

    (@joamp)

    Hey Blaz,
    that did the trick.

    Thanks a lot.

    I’m just wondering why a contact form (CF7) don’t causes this, although it uses ajax too.

    Thank you for a great support and plugin!

    Best regards,
    Stefan

    Plugin Support Blaz K.

    (@blazk)

    Hi Stefan,

    that’s a very good question ?? I checked and it seem that CF7 is using the WP REST API. Something like this here: https://gopangolin.com/beyond-admin-ajax-using-wordpress-rest-api/

    Regards,
    Blaz

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Browser notification: Authentication required’ is closed to new replies.