• Good Morning Team,

    Recently readers have been unable to leave comments on my blog

    https://www.retrofoodformoderntimes.com

    When you try to leave a comment a message pops up saying
    “Please enable referrers in your browser”.

    I used Firefox and have followed the steps in the codex to change the Firefox settings from 2 to 1 and back again.

    I have also tried many of the other fixes in the codex and nothing has worked.

    I am using Macafee security but the instructions in the codex are not helpful.

    Can anyone please help me to fix this error?

    Thanks in advance,

    Taryn

Viewing 3 replies - 1 through 3 (of 3 total)
  • The theme you are using has a built in function intended to combat comment spam or flooding. You can find it on lines 201 – 209 in the functions.php file.

    // ==================================================================
    // Comment spam, prevention
    // ==================================================================
    function adelle_theme_check_referrer() {
      if (!isset($_SERVER['HTTP_REFERER']) || $_SERVER['HTTP_REFERER'] == "" ) {
        wp_die( __( 'Please enable referrers in your browser.', 'adelle' ) );
      }
    }
    add_action( 'check_comment_flood', 'adelle_theme_check_referrer' );

    Thread Starter Taryn Nicole

    (@taryn-nicole)

    Thank you very much Clayton. And sorry for another question but if I want to change it to allow comments how would I do that? Or do I need to change to a different theme?
    Also, I have had that theme for quite some time and people could leave comments previously. Any thoughts on why it is blocking them now?

    Thanks so much and sorry for all the questions – I am not at all adept on the technical side as you have probably gathered!

    Kind Regards,

    Taryn

    I’m not sure why the behavior would change suddenly if it’s been working okay for you in the past. Have you recently added any security plugins or changed any security settings or features in a plugin you might already be using?

    You can probably temporarily comment that code out if you like and see if anything changes.

    // ==================================================================
    // Comment spam, prevention
    // ==================================================================
    /* function adelle_theme_check_referrer() {
      if (!isset($_SERVER['HTTP_REFERER']) || $_SERVER['HTTP_REFERER'] == "" ) {
        wp_die( __( 'Please enable referrers in your browser.', 'adelle' ) );
      }
    }
    add_action( 'check_comment_flood', 'adelle_theme_check_referrer' ); */

    Note the beginning /* and ending */

    I think that should do it. Be sure to make a backup before editing any files.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Enable referrers in your browser’ is closed to new replies.