Support » Plugin: Cache Enabler - WordPress Cache » Admin-ajax.php 403 forbidden with Cache Enabler after 24h

  • gogosjon

    (@gogosjon)


    Hello,

    I am using your really awesome plugin since several weeks now! The load time is crazy! It works perfectly except one little thing: After about 24h of cache time I get 403 forbidden errors when I access my page. The error says:

    admin-ajax.php Failed to load resource: the server responded with a status of 403 (Forbidden)

    I can reproduce this error by installing cache enabler on a other wordpress installation.

    This causes erros with ajax plugins (kk Star Ratings) and sometimes a problem with my ajax page loading. Could it be that cache enabler caches the csrf token?

    Site with error: https://exhaustdb.com

    Thank you very much for your help! Keep up the awesome work!
    Greetings

Viewing 4 replies - 16 through 19 (of 19 total)
  • Hadn’t thought of that, thanks ill give it a try.

    the root of the problem is nonce parameter. Put to search “nonce admin-ajax.php cache”. Sorry for bad EN.

    You can disable check nonce in index.php of module. Nonce parameter will check into check_ajax_referer function. You need just comment that check in index.php of module in function kksr_ajax().
    // check_ajax_referer($this->id);

    No way!! That actually seems to work! Thank you very much @halfhope! I will report after 24h and will mark this as solved!

    Conclusion:
    If plugins like kk-star-ratings do not work (which is caused by a caching plugin):

    comment out line 420 in /wp-content/plugins/kk-star-ratings/index.php

    change check_ajax_referer($this->id); to // check_ajax_referer($this->id);

    Have a nice day, Greetings!

    • This reply was modified 2 years, 2 months ago by gogosjon.
    • This reply was modified 2 years, 2 months ago by gogosjon.
Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Admin-ajax.php 403 forbidden with Cache Enabler after 24h’ is closed to new replies.