congratulations to the community, I use it a lot to find solutions that are always useful, but this time I'm completely blocked.
After doing a setup: upgrade
and a setup: di: compile
following installation of Welt Pixels, all products in the categories are gone.
I can see them in the Products section (in the backend) but in the Frontend they seem "invisible". In the categories it doesn't tell me that there are no products, they just aren't seen.
I've tried re-indexing, clearing cache, and all ordinary operations, but nothing to do.
I tried to see the log files (system.log) which gives me this error:
main.CRITICAL: Warning: Invalid argument supplied for foreach() in /var/www/html/magento/vendor/magento/module-catalog/view/frontend/templates/product/image_with_borders.phtml on line 27 [] []
In the phtml file mentioned in the logs I find this:
<span class="product-image-container product-image-container-<?= /* @noEscape */ $block->getProductId() ?>">
<span class="product-image-wrapper">
<img class="<?= $escaper->escapeHtmlAttr($block->getClass()) ?>"
<?php foreach ($block->getCustomAttributes() as $name => $value): ?>
<?= $escaper->escapeHtmlAttr($name) ?>="<?= $escaper->escapeHtmlAttr($value) ?>"
<?php endforeach; ?>
src="<?= $escaper->escapeUrl($block->getImageUrl()) ?>"
loading="lazy"
<?php if ($borders || $enableLazyLoadingWithoutBorders): ?>
width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>"
height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>"
<?php else: ?>
max-width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>"
max-height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>"
<?php endif; ?>
alt="<?= $escaper->escapeHtmlAttr($block->getLabel()) ?>"/></span>
</span>
Specifically, line 27 reads:
<?php foreach ($block->getCustomAttributes() as $name => $value): ?>
I am hoping for your guidance, I can't figure out if it's an array problem or something.