WPSolr Not Replacing WooCommerce Archives

  • cbarwin
    Participant
    3 years, 9 months ago #20814

    Issue:

    WPSolr is not replacing the query on any WooCommerce archive pages (Product Categories, Product Attributes, Product Tags, or the main Shop index page).

    It is properly replacing the query for search (/?s=) and on the /search-wpsolr search page containing the shortcode for the Ajax search results, [solr_search_shortcode] as well as other standard WordPress archives such as Categories.

    Environment:

    I am hosting with Kinsta.

    I am using a modified version of the plugin: wp-solr-fix-php-7.4.zip (Patrice, you sent this to me to use with PHP 7.4 as Kinsta has not yet made 7.5 available).

    I have the following settings activated in WPSolr:

    Tab 1:

    1. WooCommerce extension activated with the following options selected:
    • Replace WooCommerce drop-down list sort content with WPSOLR’s
    • Replace WooCommerce category and shop search with WPSOLR’s.

    2. Toolset Views extension is activated with following option selected:
    • Replace Toolset Archives and Views queries with WPSOLR queries

    3. WP All Import extension is activated

    Tab 2.1:

    1. Replace front-end archives are all checked

    2. Replace admin archives is checked

    3. I am using my current search theme search template with AJAX

    4. “Do not load WPSOLR front-end css” option is checked

    Tab 2.2:

    1. “Index custom fields and categories” option is checked

    2. In the “Select Data to search in” section, I have chosen to index (all status) of the following:
    • Variations
    • Products
    • Product Categories

    I selected 35 custom fields and 2 custom taxonomies in Variations and Products as well as “product_cat” taxonomy.

    I have tried using one of the default WordPress themes. I have tried disabling all other plugins besides WP Solr, Toolset, and WooCommerce.

    Please advise.

    wpsolr
    Keymaster
    3 years, 9 months ago #20815

    Do you manage your WooCommerce archives with Toolset archives?

    cbarwin
    Participant
    3 years, 9 months ago #20816

    No, I haven’t set them up yet. I could. Whatever is most compatible with WPSolr.

    cbarwin
    Participant
    3 years, 9 months ago #20817

    Also, I am getting the following errors when I debug:

    Notice: Trying to access array offset on value of type null in /www/s41tradeconnect_319/public/wp-content/plugins/wpsolr-pro/wpsolr/core/classes/extensions/suggestions/class-wpsolr-option-suggestions.php on line 168

    Notice: Undefined variable: product_variation in /www/s41tradeconnect_319/public/wp-content/plugins/wpsolr-pro/wpsolr/core/classes/models/class-wpsolr-model-builder.php on line 144
    Model type is unknown.

    cbarwin
    Participant
    3 years, 9 months ago #20818

    And also this:

    Notice: Trying to access array offset on value of type int in /www/s41tradeconnect_319/public/wp-content/plugins/wpsolr-pro/wpsolr/core/classes/engines/class-wpsolr-abstractsearchclient.php on line 2963

    wpsolr
    Keymaster
    3 years, 9 months ago #20819

    If you use Toolset, with the WPSOLR Toolset add-on activated, then all (and only) your archives and views defined with Toolset will be powered by WPSOLR.

    cbarwin
    Participant
    3 years, 9 months ago #20820

    I just enabled all archives in Toolset. Still, none of the WooCommerce related archive queries are being replaced by WPSOLR.

    wpsolr
    Keymaster
    3 years, 9 months ago #20821

    How do you know they are not replaced?

    cbarwin
    Participant
    3 years, 9 months ago #20824

    You can debug in Toolset. It shows you what the queries were.

    Category archive:
    https://www.dropbox.com/s/wqnmta5pt2m5lqt/categoryArchive.pdf?dl=0

    Search:
    https://www.dropbox.com/s/yszcca3c29x9szi/search.pdf?dl=0

    wpsolr
    Keymaster
    3 years, 9 months ago #20833

    /product-category/bath/bathroom-vanities/additional-storage/ is the WooCommerce standard product category archive?

    cbarwin
    Participant
    3 years, 9 months ago #20835

    Yes

    wpsolr
    Keymaster
    3 years, 9 months ago #20836

    And if you deactivate “Replace categories” in the WooCommerce add-on?

    wpsolr
    Keymaster
    3 years, 9 months ago #20837

    Or even deactivate the WooCommerce add-on completely, as you are building a full custom UI.

    cbarwin
    Participant
    3 years, 9 months ago #20838

    If I deactivate “Replace categories” nothing discernible happens.

    wpsolr
    Keymaster
    3 years, 9 months ago #20845

    Or even deactivate the WooCommerce add-on completely, as you are building a full custom UI

Viewing 15 posts - 1 through 15 (of 24 total)

You must be logged in to reply to this topic.