WordPress.org

Ready to get started?Download WordPress

Forums

Infinite-Scroll
Notice: Infinite Scroll behavior was called incorrectly. Behavior undefined not (1 post)

  1. YellowShark
    Member
    Posted 1 year ago #

    Upgraded from version 2.02b to latest 2.6.2, then this message appeared:

    > Notice: Infinite Scroll behavior was called incorrectly. Behavior undefined not found.

    The solution is to go to Admin -> Settings -> Infinite Scroll, and once you're there, don't change anything - just hit the "Save" button. The devs added "Behavior" as a new option, but didn't assign it a default value in the plugin_activation function.

    Infinite Scroll devs: some people don't have the ability to drop a breakpoint into _doing_it_wrong() and trace back upwards through the function stack. This code from line 134 of infinite-scroll.php really doesn't do anyone a lot of good, when it comes to figuring out what's gone wrong:

    if ( !array_key_exists( $options['behavior'], $this->behaviors ) )
    return _doing_it_wrong( 'Infinite Scroll behavior', "Behavior {$options['behavior']} not found", $this->version );

    Not only that, searching my site's code for the error message, "Infinite scroll was called incorrectly", or "Behavior undefined not found" yields zero results. A suggestion would be to at least add a filename & line # to the message parameter sent to _doing_it_wrong().

    http://wordpress.org/extend/plugins/infinite-scroll/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic