Support » Plugin: Collapsing Archives » An error occurred

  • ackie00h

    (@ackie00h)


    When I activate this plugin, an error occurred below.

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, class ‘collapsArch’ does not have a method ‘enqueue_scripts’ in /home/customer/www/harupets.com/public_html/wp-includes/class-wp-hook.php on line 307

    Now I disabled it.

    I confirmed it in the environment below.

    WordPress 5.9.2
    Collapsing Archives 2.1.3
    Other Plugins all disabled.

Viewing 4 replies - 1 through 4 (of 4 total)
  • tmr72

    (@tmr72)

    Get the same error when activating the plugin.

    • This reply was modified 5 months ago by tmr72.
    usuari0

    (@usuari0)

    I replaced these two lines with the the ones from a previous version to get it to work:

    wp_enqueue_script('jquery');
    add_action( 'wp_enqueue_scripts', array( 'collapsArch', 'enqueue_scripts' ) );

    with

    wp_enqueue_script('jquery');
    add_action( 'wp_head', array('collapsArch','get_head'));
    usuari0

    (@usuari0)

    Forgot to add the file where these lines are found

    collapsArch.php

    Thread Starter ackie00h

    (@ackie00h)

    Now, It works !!

    THANK YOU VERY MUCH, usuari0 !!!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this review.