-
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 #562
Comments
A fix is available on branches 2.3.x, 2.4.x and master. |
Thanks... Are you going to do a new version release anytime soon? |
2.3.9 has been released and contains the fix. BR, |
@afoucret ... after upgrading to 2.3.9... I'm missing products from categories, any idea? |
@afoucret if ($optionLabel !== null && isset($items[$optionLabel])) {
$items[$optionLabel]['adminSortIndex'] = $optionPosition;
$items[$optionLabel]['value'] = $option['value'];
} Possible Solution: $optionLabel = trim($optionLabel);
if (isset($items[$optionLabel])) {
$items[$optionLabel]['adminSortIndex'] = $optionPosition;
$items[$optionLabel]['value'] = $option['value'];
} Another improvement can be made: usort($items, function ($item1, $item2) {
return $item1['adminSortIndex'] <=> $item2['adminSortIndex'];
}); |
Exception #0 (Exception): Notice: Undefined index: adminSortIndex in /vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/Layer/Filter/Attribute.php on line 279
Preconditions
Magento Version : 2.1.9EE
ElasticSuite Version : 2.3.7
We are using a third-party extension to create products/attributes and it doesn't always add the 'adminSortIndex' for newly created attributes. To fix we normally have to resave the attributes option.
Possible Solution
The text was updated successfully, but these errors were encountered: