• Resolved fprasuhn

    (@fprasuhn)


    Greetings:

    I am developing several blog pages for a client. They would like to allow duplicate postings since they are collecting comments from the organization’s membership.

    I searched setting, www.ads-software.com, and plug-in sites to learn how I may accomplish allowing duplicate comments for each blog page. I have not found a solution.

    Plug-ins for site:
    Akismet
    Version 3.1.2 | By Automattic

    Jetpack by WordPress.com
    Version 3.5.3 | By Automattic

    Vanilla PDF Embed
    Version 0.0.7 | By Mike Doherty

    W3 Total Cache
    Version 0.9.4.1 | By Frederick Townes

    Weaver II Theme Extras
    Version 2.3 | By Bruce Wampler

    Wordfence Security
    Version 6.0.10 | By Wordfence

    Clients wish to keep the information on the site. Thus, I will provide URL selectively.

    Thanks for the help…fred

    https://www.ads-software.com/plugins/jetpack/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    That duplicate comment detection is handled by WordPress itself, not by your plugins. I’d suggest giving that a try:
    https://stackoverflow.com/a/11595416/1045686

    That should help.

    Thread Starter fprasuhn

    (@fprasuhn)

    Jeremy:

    Thank you for your assistance.

    I found wp-includes/functions.php file. I copy and pasted the code shown between asterisks (***).

    **************************************************
    add_filter( ‘wp_die_handler’, ‘my_wp_die_handler_function’, 9 ); //9 means you can unhook the default before it fires

    function my_wp_die_handler_function($function) {
    return ‘my_skip_dupes_function’; //use our “die” handler instead (where we won’t die)
    }

    //check to make sure we’re only filtering out die requests for the “Duplicate” error we care about
    function my_skip_dupes_function( $message, $title, $args ) {
    if (strpos( $message, ‘Duplicate comment detected’ ) === 0 ) { //make sure we only prevent death on the $dupe check
    remove_filter( ‘wp_die_handler’, ‘_default_wp_die_handler’ ); //don’t die
    }
    return; //nothing will happen
    }

    ******************************************************************************

    I placed that code at the bottom of the file. Saved. When I attempt to open a browser with the site I receive the following message:

    Fatal error: Call to undefined function add_filter() in /hermes/bosnaweb03a/b242/ipg.fredprasuhncom/tech-wise.services/150601NAR/wp-includes/functions.php on line 4849

    Should I have placed code some other place in the file?

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    You’ll want to place that code in a functionality plugin, instead of editing core files:
    https://www.ads-software.com/plugins/functionality/

    Thread Starter fprasuhn

    (@fprasuhn)

    Jeremy:

    THANK YOU!

    I just learned something new about WordPress. I greatly appreciate your patience and wisdom. The “functionality” plugin works great.

    fred

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Duplicate comment detected; it looks as though you’ve already said that!’ is closed to new replies.