• Hi,
    I wanted to point out problems with the search bar using the latest Phlox Core plugin and theme.

    1. Unfortunately the search results don’t work at all and the website crashes when you have Uncropped images on your page (Customization > Woocommerce > Product images > Uncropped).

    This happens because in general-fuctions.php:2406, the code checks for image size (width/height), and the height parameter is not defined with this option (only width is defined).

    This is var_dump of the $results from 2406 line:

    array(3) { [“width”]=> int(300) [“height”]=> string(0) “” [“crop”]=> int(0) }

    I have replaced the next line with aspect ratio 1 and the website no longer crashes.

    1. This occurs only in the default search page when no post_type parameter is given. When I add post_type=product to the search request, the page is no longer crashing and the website loads the correct images and aspect ratios. Example request:

    https://localhost/sklep/?s=500g&post_type=product

    1. It would be really great if you could add the default post_type selection to the search form widget. It is available in the modern search widget, but this one doesn’t allow for form style as the other one does. And I really want to set it up this way for our e-commerce site (so only the products will show up).
  • The topic ‘Search bar problem’ is closed to new replies.