-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined index: adminSortIndex #677
Comments
Hello @jeroenkosse and thank you for using our module. I just reproduced your bug on my testing environment, so it's confirmed. Will try to provide a fix for this one. |
Agree with triming like proposed by @jeroenkosse |
Yes this is due to the fact that we trim the option label when indexing, so when re-sorting them in the attribute model, we have in entry the trimmed option label, and we try to sort on the "raw" one which is not trimmed. I tested this solution and proposed PR #678 |
Thnx for the quick response and hope to fetch a new release soon |
PR merged. |
Exception #0 (Exception): Notice: Undefined index: adminSortIndex in /vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/Layer/Filter/Attribute.php on line 271
Preconditions
Magento Version : 2.2.1
ElasticSuite Version : 2.4.6
Steps to reproduce
When there is a space after the label for a specific attribute the module is trying to find the value with the space. The label from the item from the variable $items that is passed to the array is not containing the space.
Possible solution
$optionLabel = trim((string)$option['label']);
The text was updated successfully, but these errors were encountered: