• Resolved clintdosporra

    (@clintdosporra)


    [19-Aug-2023 11:56:54 UTC] PHP Fatal error: Uncaught TypeError: array_intersect(): Argument #1 ($array) must be of type array, string given in /usr/www/users/xxx/wp-content/plugins/yith-woocommerce-ajax-navigation/includes/class-yith-wcan-query.php:1041
    
    Stack trace:
    
    #0 /usr/www/users/xxx/wp-content/plugins/yith-woocommerce-ajax-navigation/includes/class-yith-wcan-query.php(1041): array_intersect('919', Array)
    
    #1 /usr/www/users/xxx/wp-content/plugins/yith-woocommerce-ajax-navigation/includes/filters/class-yith-wcan-filter-tax.php(516): YITH_WCAN_Query->get_query_relevant_term_objects('product_cat', 19, true)
    
    #2 /usr/www/users/xxx/wp-content/plugins/yith-woocommerce-ajax-navigation/includes/filters/class-yith-wcan-filter-tax.php(454): YITH_WCAN_Filter_Tax->get_term_products(19)
    
    #3 /usr/www/users/xxx/wp-content/plugins/yith-woocommerce-ajax-navigation/includes/filters/class-yith-wcan-filter-tax.php(390): YITH_WCAN_Filter_Tax->get_term_children(19)
    
    #4 /usr/www/users/xxx/wp-content/plugins/yith-woocommerce-ajax-navigation/includes/filters/class-yith-wcan-filter-tax.php(339): YITH_WCAN_Filter_Tax->get_formatted_terms()
    
    #5 /usr/www/users/xxx/wp-content/plugins/yith-woocommerce-ajax-navigation/includes/filters/class-yith-wcan-filter-tax.php(46): YITH_WCAN_Filter_Tax->has_relevant_terms()
    
    #6 /usr/www/users/xxx/wp-content/plugins/yith-woocommerce-ajax-navigation/includes/class-yith-wcan-preset.php(365): YITH_WCAN_Filter_Tax->is_relevant()
    
    #7 /usr/www/users/xxx/wp-content/plugins/yith-woocommerce-ajax-navigation/templates/shortcodes/filters.php(23): YITH_WCAN_Preset->has_relevant_filters()
    
    #8 /usr/www/users/xxx/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('/usr/www/users/...')
    
    #9 /usr/www/users/xxx/wp-content/plugins/yith-woocommerce-ajax-navigation/includes/functions-yith-wcan.php(938): wc_get_template('shortcodes/filt...', Array, 'woocommerce/yit...', '/usr/www/users/...')
    
    #10 /usr/www/users/xxx/wp-content/plugins/yith-woocommerce-ajax-navigation/includes/shortcodes/class-yith-wcan-shortcode-filters.php(48): yith_wcan_get_template('shortcodes/filt...', Array, false)
    
    #11 /usr/www/users/xxx/wp-includes/shortcodes.php(395): YITH_WCAN_Shortcode_Filters::render(Array, '', 'yith_wcan_filte...')
    
    #12 [internal function]: do_shortcode_tag(Array)
    
    #13 /usr/www/users/xxx/wp-includes/shortcodes.php(235): preg_replace_callback('/\\[(\\[?)(yith_w...', 'do_shortcode_ta...', '[yith_wcan_filt...')
    
    #14 /usr/www/users/xxx/wp-content/plugins/yith-woocommerce-ajax-navigation/includes/widgets/class-yith-wcan-filters-widget.php(123): do_shortcode('[yith_wcan_filt...')
    
    #15 /usr/www/users/xxx/wp-includes/class-wp-widget.php(394): YITH_WCAN_Filters_Widget->widget(Array, Array)
    
    #16 /usr/www/users/xxx/wp-includes/widgets.php(837): WP_Widget->display_callback(Array, Array)
    
    #17 /usr/www/users/xxx/wp-content/themes/Divi/includes/builder/module/Sidebar.php(206): dynamic_sidebar('sidebar-1')
    
    #18 /usr/www/users/xxx/wp-content/themes/Divi/includes/builder/class-et-builder-element.php(3340): ET_Builder_Module_Sidebar->render(Array, '', 'et_pb_sidebar', '', '', '', '', '')
    
    #19 /usr/www/users/xxx/wp-includes/shortcodes.php(395): ET_Builder_Element->_render(Array, '', 'et_pb_sidebar')
    
    #20 [internal function]: do_shortcode_tag(Array)
    
    #21 /usr/www/users/xxx/wp-includes/shortcodes.php(235): preg_replace_callback('/\\[(\\[?)(et_pb_...', 'do_shortcode_ta...', '[et_pb_sidebar ...')
    
    #22 /usr/www/users/xxx/wp-content/themes/Divi/includes/builder/main-structure-elements.php(3784): do_shortcode('[et_pb_sidebar ...')
    
    #23 /usr/www/users/xxx/wp-content/themes/Divi/includes/builder/class-et-builder-element.php(3340): ET_Builder_Column->render(Array, '[et_pb_sidebar ...', 'et_pb_column', '', '', '', '', '')
    
    #24 /usr/www/users/xxx/wp-includes/shortcodes.php(395): ET_Builder_Element->_render(Array, '[et_pb_sidebar ...', 'et_pb_column')
    
    #25 [internal function]: do_shortcode_tag(Array)
    
    #26 /usr/www/users/xxx/wp-includes/shortcodes.php(235): preg_replace_callback('/\\[(\\[?)(et_pb_...', 'do_shortcode_ta...', '[et_pb_column t...')
    
    #27 /usr/www/users/xxx/wp-content/themes/Divi/includes/builder/main-structure-elements.php(2274): do_shortcode('[et_pb_column t...')
    
    #28 /usr/www/users/xxx/wp-content/themes/Divi/includes/builder/class-et-builder-element.php(3340): ET_Builder_Row->render(Array, '[et_pb_column t...', 'et_pb_row', '', '', '', '', '')
    
    #29 /usr/www/users/xxx/wp-includes/shortcodes.php(395): ET_Builder_Element->_render(Array, '[et_pb_column t...', 'et_pb_row')
    
    #30 [internal function]: do_shortcode_tag(Array)
    
    #31 /usr/www/users/xxx/wp-includes/shortcodes.php(235): preg_replace_callback('/\\[(\\[?)(et_pb_...', 'do_shortcode_ta...', '[et_pb_row colu...')
    
    #32 /usr/www/users/xxx/wp-content/themes/Divi/includes/builder/main-structure-elements.php(1606): do_shortcode('[et_pb_row colu...')
    
    #33 /usr/www/users/xxx/wp-content/themes/Divi/includes/builder/class-et-builder-element.php(3340): ET_Builder_Section->render(Array, '[et_pb_row colu...', 'et_pb_section', '', '', '', '', '')
    
    #34 /usr/www/users/xxx/wp-includes/shortcodes.php(395): ET_Builder_Element->_render(Array, '[et_pb_row colu...', 'et_pb_section')
    
    #35 [internal function]: do_shortcode_tag(Array)
    
    #36 /usr/www/users/xxx/wp-includes/shortcodes.php(235): preg_replace_callback('/\\[(\\[?)(et_pb_...', 'do_shortcode_ta...', '<div class="et-...')
    
    #37 /usr/www/users/xxx/wp-includes/class-wp-hook.php(310): do_shortcode('<div class="et-...')
    
    #38 /usr/www/users/xxx/wp-includes/plugin.php(205): WP_Hook->apply_filters('<div class="et-...', Array)
    
    #39 /usr/www/users/xxx/wp-content/themes/Divi/includes/builder/core.php(26): apply_filters('et_builder_rend...', '[et_pb_section ...')
    
    #40 /usr/www/users/xxx/wp-content/themes/Divi/includes/builder/frontend-builder/theme-builder/frontend.php(347): et_builder_render_layout('[et_pb_section ...')
    
    #41 /usr/www/users/xxx/wp-content/themes/Divi/includes/builder/frontend-builder/theme-builder/frontend.php(506): et_theme_builder_frontend_render_layout('et_body_layout', 171)
    
    #42 /usr/www/users/xxx/wp-content/themes/Divi/includes/builder/frontend-builder/theme-builder/frontend-body-template.php(10): et_theme_builder_frontend_render_body(171, true, false)
    
    #43 /usr/www/users/xxx/wp-includes/template-loader.php(106): include('/usr/www/users/...')
    
    #44 /usr/www/users/xxx/wp-blog-header.php(19): require_once('/usr/www/users/...')
    
    #45 /usr/www/users/xxx/index.php(17): require('/usr/www/users/...')
    
    #46 {main}
    
    thrown in /usr/www/users/xxx/wp-content/plugins/yith-woocommerce-ajax-navigation/includes/class-yith-wcan-query.php on line 1041

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @clintdosporra,

    I ran into the same issue on one of my client’s website. It seems that it has to do with some corruption in the database. Restoring the database to a back-up made before the upgrade of the YITH plug-in solves the issue, and also makes it possible to upgrade to the new version.

    Unfortunately is just rollbacking the plug-in and re-upgrading not the solution.

    Cheers!

    same issue also here (PHP 8.0.30)

    • This reply was modified 1 year, 3 months ago by Marc.
    Thread Starter clintdosporra

    (@clintdosporra)

    @chiel-oude-breuil are there specific tables that I need to restore or just the whole database? This will surely affect orders and users etc? I am not too offay with databses so just need to make sure I am doing the right thing!

    Plugin Support Facundo Arano

    (@aranofacundo)

    Hi there,

    We have been able to replicate the issue, but we will need to do some more tests to find the solution.

    In the meantime, please, try adding the following PHP code in the functions.php file of your current theme and then check if the issue is solved:

    add_filter( 'yith_wcan_suppress_cache', '__return_true' );

    Let us know if this helped you.

    @aranofacundo , yes, that fixed the issue.

    Plugin Support Alessio Torrisi

    (@alessio91)

    Hi there,

    we’re going to release a new version Today, please remove the code we provided as soon as you’ll update.

    Thank you for your great cooperation.

    ok, thanks, i can confirm it works back like a charm !

    Plugin Support Alessio Torrisi

    (@alessio91)

    Hi there,

    happy to see everything is working fine now ??

    Have a great weekend.

    Thread Starter clintdosporra

    (@clintdosporra)

    Awesome! Thanks for the amazing support! it short-term fixed worked a charm and the update has fixed everything!

    Sorry for not getting back to you guys sooner! What an amzing team!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Fatal Error – Uncaught TypeError: array_intersect()’ is closed to new replies.