Support » Plugin: SM Gallery » error code

  • getting this error on all pages

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, array must have exactly two members in /home4/aodkinc/public_html/wp-includes/plugin.php on line 525

    I deactivated all plugins and SM Gallery is the one causing the error

    https://wordpress.org/plugins/sm-gallery/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Seth Carstens

    (@sethcarstens)

    Ok thanks for the update, we will look into the problem.

    Thread Starter aodkinc

    (@aodkinc)

    Seth, anyone else having this problem? can you tell me if this is a problem on our end or if it definitely is a problem with the gallery?

    I appreciate it, thanks

    I have had the same error on WP version 3.9.14. The error in this case is on line 470, but that equates to the same line in the do_action function.

    It seems there is a do_action call that is not passing a valid callback function.

    Any ideas? The error is pretty ugly next to such a great gallery…

    Dom

    Hi again,

    I fixed the errors.

    1. In the plugin file sm-gallery.php on line 72 remove the 3rd array element with the value ‘1’ from the 2nd parameter of add_action. So it changes from this:
    add_action('get_footer', array($this, 'conditional_gallery_script_enqueue', 1));
    … to this:
    add_action('get_footer', array($this, 'conditional_gallery_script_enqueue'));

    2. In the plugin file sm-gallery.php move line 20…
    add_action( 'plugins_loaded', array ( 'sm_gallery_plugin', 'get_instance' ) );
    … to below the definition of the class sm_gallery_plugin

    That fixed all the errors for me. Perhaps a patch and a new version 1.1.19 is in order 🙂

    @domthebusker – Thanks so much for this. I had a slightly different error than above but altering line 72 alone fixed it for me. I was just about to abandon using the plugin too 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘error code’ is closed to new replies.