• I am getting the following Error on Taxonomy Archive Pages:

    Warning: extract() expects parameter 1 to be array, null given in /home/public_html/wp-content/plugins/woocommerce-ajax-filters/templates/widget_selected_area.php on line 1

    …when viewing a Taxonomy-Archive.

    The error occurs in archive-product.php within the action woocommerce_archive_description.
    I just googled it and it seems like the error occurs on more pages and google already indexed it.

    I am using the Storefront Theme.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Dmytro Holovnia

    (@dholovnia)

    Hi @teresasumisu,

    Do you have the most recent version of the plugin installed?

    Please provide your site url where I can see the issue.

    Regards,
    Dima

    Thread Starter teresasumisu

    (@teresasumisu)

    Hi @dholovnia !

    Thank you for your answer.

    https://haarbedarf.shop/produkt-kategorie/marken/aveda/

    I have the Product Filter Version 1.3.1.8
    WooCommerce 3.6.1
    And WooCommerce Germanized 2.2.11 and Pro: 1.9.11

    Plugin Author Dmytro Holovnia

    (@dholovnia)

    I did check the code. We have only 2 places where this widget is called and both have needed parameter for extract.

    Are you calling br_get_template_part( 'widget_selected_area' ); in your template?

    Thread Starter teresasumisu

    (@teresasumisu)

    No i don’t.
    I am using the Plugin only through the sidebar, and the sidebar is not called on this page.

    Can’t you just adapt the extract() function so it does not throw an error? That would be so great.

    Plugin Author Dmytro Holovnia

    (@dholovnia)

    “I am using the Plugin only through the sidebar, and the sidebar is not called on this page.” – so it shouldn’t be called there at all.

    What are you showing at that part? Is this products list? What did you use to show it?

    Thread Starter teresasumisu

    (@teresasumisu)

    As said – I am using the storefront theme.
    If you download it and look into the template “archive-product.php”, there is a action called ‘woocommerce_archive_description’.
    If I remove the action, the Error Message disappears.
    So it must be somehow connected to this hook.
    Your Plugin also hooks into this action: main.php row 220.

    But the hook also appears in the archive-prodct.php Template of the WooCommerce Plugin itself.

    Plugin Author Dmytro Holovnia

    (@dholovnia)

    Yes, and the code that is running on this hook is

    
    public function selected_area() {
            $set_query_var_title = array();
            $br_options = apply_filters( 'berocket_aapf_listener_br_options', $this->get_option() );
            $set_query_var_title['title'] = apply_filters( 'berocket_aapf_widget_title', ( empty($title) ? '' : $title ) );
            $set_query_var_title['uo'] = br_aapf_converter_styles( ( empty($br_options['styles']) ? '' : $br_options['styles'] ) );
            $set_query_var_title['selected_area_show'] = empty($br_options['selected_area_hide_empty']);
            $set_query_var_title['hide_selected_arrow'] = false;
            $set_query_var_title['selected_is_hide'] = false;
            $set_query_var_title['is_hooked'] = true;
            $set_query_var_title['is_hide_mobile'] = false;
            set_query_var( 'berocket_query_var_title', $set_query_var_title );
            br_get_template_part( 'widget_selected_area' );
        }
    

    As you can see from set_query_var( 'berocket_query_var_title', $set_query_var_title ); var berocket_query_var_title cannot be null.

    Or some other plugin is removing query_vars or you need to re-install the plugin.

    I did test it locally and as for now I cannot reproduce your issue.

    Btw I’m using Storefront too.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Taxonomy Archive Pages: extract() expects parameter 1 to be array, null given’ is closed to new replies.