Description
Preconditions (*)
Tested on this versions:
1. Magento 2.4.7-p4
2. page builder v-1.7.5-beta1
3. page builder v-1.7.5-beta2
Description (*)
When adding a Product Slider through Page Builder and selecting the Product Carousel appearance, an error occurs:
“Error filtering template: Warning: Undefined array key "options" in /var/www/public_html/vendor/magento/module-page-builder/view/frontend/templates/catalog/product/widget/content/carousel.phtml on line 64”
Steps to reproduce (*)
1. Log in to the Magento Admin Panel.
2. Navigate to Content → Blocks and click on Add New Block.
3. Click Edit with Page Builder and add a Row.
4. Expand the Add Content menu and drag the Product widget onto the row.
5. Click Edit, select a Category, and choose Appearance: Product Carousel. (as shown in screenshot-1)
6. Save the Edit Products and observe the error.(as shown in screenshot-2)
Screenshot-1:-(Edit Product page)
Screenshot-2:-(Error Page)
Expected result (*)
The Product Slider should appear correctly after saving Edit Products.
Actual result (*)
After saving Edit Products an error message is displayed instead of the Product Slider.
Additional Information(*)
As I checked in file magento/module-page-builder /view/frontend/templates/catalog/product/widget/content/carousel.phtml The issue occurs when the product slider does not have a bundle product. At that time, the options are not defined, causing an error.
A possible fix is to add a condition to check whether the options are available or not.