Support » Plugin: Kudos » ajax errors when manually disabled kudos

  • wearebase

    (@wearebase)


    When you disable kudos auto-inserting itself into the page, and then call it manually through kudos(), on pages that kudos() is not active then the ajax requests will cause errors in PHP.

    PHP Notice:  Undefined index: ids in /wp-content/plugins/kudos/php/ajax.php on line 138
    PHP Warning:  Invalid argument supplied for foreach() in /wp-content/plugins/kudos/php/ajax.php on line 138
    PHP Warning:  extract() expects parameter 1 to be array, null given in /wp-content/plugins/kudos/php/functions.php on line 70

    I’ve looked into it and it comes from kudos.js – where the jQuery each runs through each .kudoable and retrieves the data-id and inserts it into the array. Of course, if there are no .kudoable’s on the page, it’ll pass an empty array.

    It would be nice to have the plugin prevent the ajax running if there is no kudos element on the page.

    https://wordpress.org/plugins/kudos/

  • The topic ‘ajax errors when manually disabled kudos’ is closed to new replies.