Magento2: Enabling "Automatic (equalize product counts)" on Price Navigation Step Calculation causes "Undefined offset" Notice

Created on 25 Sep 2017  路  7Comments  路  Source: magento/magento2


Preconditions

  1. Magento 2.1.9
  2. PHP 7.0.20
  3. MySQL 5.6.36
  4. Use Flat Catalog Category (Yes) in Stores > Config > Catalog > Storefront
  5. Use Flat Catalog Product (Yes) in Stores > Config > Catalog > Storefront
  6. Search Engine MySQL in Stores > Config > Catalog > Catalog Search
  7. Minimal Query Length 3 in Stores > Config > Catalog > Catalog Search
  8. Maximum Query Length 128 in Stores > Config > Catalog > Catalog Search

Steps to reproduce

  1. Enable Display Product Count in Stores > Config > Catalog > Layered Navigation.
  2. Set Price Navigation Step Calculation to Automatic (equalize product counts)
  3. Clear Caches
  4. Perfom a full re-index
  5. Perfom a search i.e. /catalogsearch/result/?q=tops

Expected result

  1. The results page with the list of products

Actual result

Exception #0 (Exception): Notice: Undefined offset: 14 in /Users/me/Sites/magento2/vendor/magento/framework/Search/Dynamic/Algorithm.php on line 300

As you can see from the screenshot below, $values[14]; in this case is not in $values.

_Screenshot of values at time of Error:_
screen shot 2017-09-25 at 15 29 36

Cannot Reproduce Clear Description Format is valid

Most helpful comment

I am running into the same issues, when I disable the
Display Product Count in Stores > Config > Catalog > Layered Navigation
and change this option to Manuel:
Set Price Navigation Step Calculation to Automatic (equalize product counts)
It work.

All 7 comments

@Loxzibit, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.
We tested the issue on 2.1.9

I have the same problem here.

After changed back to equalize price range, no more error message.

Should reopen this case.

If this is the same as what I ran into, it is an issue with the layered navigation block when using this setting and Amasty Improved Layered Navigation. So the bug should remain closed. It's an Amasty bug, not a Magento bug.

I am running into the same issues, when I disable the
Display Product Count in Stores > Config > Catalog > Layered Navigation
and change this option to Manuel:
Set Price Navigation Step Calculation to Automatic (equalize product counts)
It work.

i have same problem, any idea to fix this

@haimarlboro just switch back to equalize price ranges.
Equalize product counts causes this error in Magento 2.3.2 with Elasticsearch.

I have just had this, no elastic search, on both 2.3.2 and 2.3.3

Was this page helpful?
0 / 5 - 0 ratings