Support » Theme: Canary » Upgrade to v2.3 breaks site – admin bar and widgets disappear

  • Resolved funex

    (@funex)


    Hi. I have a child theme based on Canary v2.2. Upon upgrading to version 2.3 my site not longer works – the admin bar and widget area no longer functions.

    Child Theme Configurator reports the following errors:

    Fatal error:  Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed in /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-includes/class-wp-hook.php on line 286 and exactly 3 expected in /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-content/themes/canary/inc/filters.php:109
    Stack trace:
    #0 /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-includes/class-wp-hook.php(286): {closure}('Calendar')
    #1 /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-includes/plugin.php(208): WP_Hook->apply_filters('Calendar', Array)
    #2 /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-content/plugins/google-calendar-events/includes/widgets/calendar.php(79): apply_filters('widget_title', 'Calendar')
    #3 /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-content/plugins/elementor/includes/widgets/wordpress.php(262): SimpleCalendar\Widgets\Calendar->widget(Array, Array)
    #4 /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-content/plugins/elementor/includes/base/widget-base.php(501): Elementor in /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-content/themes/canary/inc/filters.php on line 109
Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Linesh Jose

    (@lineshjose)

    Hi, If you are using old version of WP. Please upgrade to latest version.

    What do you mean by “old”? I’m using WordPress 5.1.1, which, I believe, is the latest version. Also PHP v7.3.4

    Now WordPress 5.2.
    Discovered the source of the Fatal Error was another plugin.
    However, the theme update appeared to have reset all the sidebar widgets. As I have several sidebars this is rather annoying. Fortunately, I could restore them from a backup.

    Thanks for your “help”.

    Scratch that. After further investigation it is indeed the theme update.

    #5 /var/www/vhosts/hastingsflyfishe in /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-content/themes/canary/inc/filters.php on line 109

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed in /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-includes/class-wp-hook.php on line 286 and exactly 3 expected in /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-content/themes/canary/inc/filters.php:109 Stack trace: #0 /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-includes/class-wp-hook.php(286): {closure}('Pic of the Mont...') #1 /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-includes/plugin.php(208): WP_Hook->apply_filters('Pic of the Mont...', Array) #2 /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-content/plugins/image-widget/image-widget.php(116): apply_filters('widget_title', 'Pic of the Mont...') #3 /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-includes/class-wp-widget.php(378): Tribe_Image_Widget->widget(Array, Array) #4 /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-includes/widgets.php(770): WP_Widget->display_callback(Array, Array) #5 /var/www/vhosts/hastingsflyfishe in /var/www/vhosts/hastingsflyfishers.org.au/httpdocs/wp-content/themes/canary/inc/filters.php on line 109

    • This reply was modified 1 month, 1 week ago by  funex.
    • This reply was modified 1 month, 1 week ago by  funex.
    funex

    (@funex)

    It seems that this fuction doesn’t sit well with the Simple Calendar plugin:

    // add the filter for search widget title ....
    add_filter( 'widget_title', function( $instance_title,$instance,$this_id_base ) { 
        if($this_id_base=='search'){
        	$instance_title = ! empty( $instance['title'] ) ? $instance['title'] :__('Search','canary');
        }  
        return $instance_title; 
    } ); 

    Remove it and the site appears to work as normal. Deactivating the plugin also “fixes” the problem. However, I’m reluctant to drop the plugin because it does exactly what I want it to do and I’d hate to have to change the theme after all the work I’ve put into the child theme.

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