When facets leave only one product, it gets rendered via single-product.php

  • leomoon
    Participant
    4 years, 6 months ago #14711

    Facets all work fine as long as there is more than one product left when filtering. But once the filtering is reduced down to a single product, then instead of displaying it as product archive, the template is changed to single-product.php and since we are within archive, all you get are related products that would normally be displayed below product details on single-product.php

    Example search https://test.antikvarijatknjiga.hr/?s=kapital&post_type=product

    if you select Bernard Foley (1) for the author for example, you get the effect I am talking about.

    wpsolr
    Keymaster
    4 years, 6 months ago #14712
    leomoon
    Participant
    4 years, 6 months ago #14721

    Unfortunately, this is not the reason. I have experimented with that, but at the moment, no changes to is_replace_by_wpsolr is taking place. As a matter of act, I have just disabled every single plugin except for WPSolr and Woocommerce and customization on test.antikvarijatknjiga.hr and have even switched theme to twentyfifteen just to eliminate all external potential sources of the problem and the same thing happens:
    once the filters are down to a single post, it attempts to get rendered with single product template resulting only in related products being shown.

    wpsolr
    Keymaster
    4 years, 6 months ago #14722

    And without the WooCommerce add-on?

    leomoon
    Participant
    4 years, 6 months ago #14728

    I turned it off now: https://test.antikvarijatknjiga.hr/?s=kapital

    With woocommerce turned off, all results get rendered with search.php of the theme, regardless of whether there are one or more of them.

    wpsolr
    Keymaster
    4 years, 6 months ago #14729

    Can you try with storefront and the add-on “on”?

    leomoon
    Participant
    4 years, 6 months ago #14732

    The same problem https://test.antikvarijatknjiga.hr/?s=kapital&post_type=product

    If you select eg. Adam Smith as author, related products show.

    wpsolr
    Keymaster
    4 years, 6 months ago #14733

    I tested the same configuration, but no issue for single result.

    Do you see anything in your debug.log?

    leomoon
    Participant
    4 years, 6 months ago #14736

    No errors whatsoever. I’ll have to create a minimal staging environment for you so you can check it out – I don’t see any other solution.

    wpsolr
    Keymaster
    4 years, 6 months ago #14737

    The minimal staging environment is a good idea indeed. Check that you have PHP 7.1 minimum, and WordPress, Elasticsearch or Solr up to date.

    Notice that I do not log in customer’s backends during support. We need to find out what is different from my own environments, so I can replicate it to be able to xdebug the issue.

    leomoon
    Participant
    4 years, 6 months ago #14738

    This environment is remote xdebug enabled already and it is on PHP 7.3.5. WordPress is the latest. The only things active are the storefront theme (latest), woocommerce (latest), and wpsolr which is at 21.6. The particular ZIP you sent me the link for at one point was named wpsolr-pro-woocommerce-custom-taxonomies.zip. The archive was created on 24.8.

    Is this enough information for debugging?

    PHPSTORM is the debug string.

    wpsolr
    Keymaster
    4 years, 6 months ago #14740

    Can you install the latest version of WPSOLR and test?

    leomoon
    Participant
    4 years, 6 months ago #14747

    I can’t get authorization to purchase another license until I get this working so I am in a gridlock. I’ve been trying to integrate this search for over year and a half and the site is still in testing and cannot go live until I prove this is working properly. Where can I get the latest version before purchasing another license? Obviously, if everthing is working properly, the site can go live and I’ll be purchasing a license as it is necessary for live site.

    wpsolr
    Keymaster
    4 years, 6 months ago #14748

    You can take a trial on https://www.wpsolr.com/pricing/.

    leomoon
    Participant
    4 years, 6 months ago #14749

    Just downloaded the trial, and the problem is still there exactly as on version 21.6. But you should be able to xdebug it without problems at this point.

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

You must be logged in to reply to this topic.