PHP7.4 & Mysql 8
Magento Version : 2.4.0
ElasticSuite Version: 2.10.0
Environment: Production mode
1.The layer navigation should be shown and work properly
==> var/log/system.log <==
[2020-08-27 10:19:01] main.CRITICAL: Notice: Trying to access array offset on value of type int in /var/www/html/releases/62/vendor/smile/elasticsuite/src/module-elasticsuite-swatches/Block/Navigation/Renderer/Swatches/RenderLayered.php on line 70 [] []

I have the same issue. I solved it by adding this check for now
foreach (array_merge(array_flip($sortingArr), $attributeOptions) as $item) {
if(is_array($item)) {
$attributeOptionsSort[$item['id']] = $item;
}
}
But i don't think this is the most clean solution.
I tested it with the following specs:
This is what $item returns:
2020-09-24T08:09:11+00:00 INFO (6): array (
'label' => 'XS',
'link' => 'https://*********************/dames/kleding.html?clothing_size=XS',
'custom_style' => '',
'id' => '40',
)
2020-09-24T08:09:11+00:00 INFO (6): array (
'label' => 'M',
'link' => 'https://*********************dames/kleding.html?clothing_size=M',
'custom_style' => '',
'id' => '42',
)
2020-09-24T08:09:11+00:00 INFO (6): 5
2020-09-24T08:09:11+00:00 INFO (6): 6
2020-09-24T08:09:11+00:00 INFO (6): 7
2020-09-24T08:09:11+00:00 INFO (6): 8
2020-09-24T08:09:11+00:00 INFO (6): 9
2020-09-24T08:09:11+00:00 INFO (6): 10
2020-09-24T08:09:11+00:00 INFO (6): 11
2020-09-24T08:09:11+00:00 INFO (6): array (
'label' => '32',
'link' => 'https://*********************/dames/kleding.html?clothing_size=32',
'custom_style' => '',
'id' => '45',
)
2020-09-24T08:09:11+00:00 INFO (6): array (
'label' => '34',
'link' => 'https://*********************/dames/kleding.html?clothing_size=34',
'custom_style' => '',
'id' => '46',
)
Hi @leonhelmus
Thanks for your help, I'll check it out.
Best regards
Hi @leonhelmus
I had the same issue and with your check it was working.
Hi @leonhelmus
Thanks for your help, I'll check it out.Best regards
Hi @vahonc , do you have any update for this bug, I'm facing this issue and hope that we will have update for it soon.
Thanks
Hello @justin-spotire,
Unfortunately, so far I haven't been able to reproduce this test case. Seems previous versions of PHP may have been less strict on such mistakes and silently swallowed the error / notice while 7.4 does not do this anymore. But you can try the solution that was suggested by @leonhelmus and which I a little bit updated on my own, and give us your feedback if it helped you.
foreach (array_merge(array_flip($sortingArr), $attributeOptions) as $item) {
if(isset($item) && is_array($item)) {
$attributeOptionsSort[$item['id']] = $item;
}
}
I will add the official MR a little bit later.
Best regards,
@vahonc yes, it probably has something to do with strict typing. I have seen those issues a lot in 2.4.1.
I've the same problem with Magento 2.4.1 and Php 7.4
Hello @sedax90,
Have you tried the solution from my last comment?
Best regards,
@vahonc your solution is working fine, I think we need a patch with this code
@rbayet do you have some estimate when this fix will be released? Is there something we may help you with?
Most helpful comment
I have the same issue. I solved it by adding this check for now
But i don't think this is the most clean solution.
I tested it with the following specs:
This is what $item returns: