Skip to content

Rewriting product listing widget block breaks its template rendering. #16529

Closed
@sanganinamrata

Description

@sanganinamrata

Preconditions

  1. Magento version 2.2.x

Steps to reproduce

  1. For some customisation, I've rewrite block of Magento\CatalogWidget\Block\Product\ProductsList to
    Mycompany\Mymodule\Block\Product\ProductsList in front-end's di.xml.
  2. Now Added below product listing widget in backend CMS block:

{{widget type="Magento\CatalogWidget\Block\Product\ProductsList" products_count="8" template="Magento_CatalogWidget::product/widget/content/grid.phtml" conditions_encoded="^[`1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Combine`,`aggregator`:`all`,`value`:`1`,`new_child`:``^],`1--1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Product`,`attribute`:`visibility`,`operator`:`==`,`value`:`4`^]^]"}}

  1. https://www.screencast.com/t/OWr5hKuSa4

Expected result

The widget template should be rendered successfully.

Actual result

The widget template rendering gives following error:

  1. https://www.screencast.com/t/jPQs8Fps9

Metadata

Metadata

Labels

Fixed in 2.1.xThe issue has been fixed in 2.1 release lineFixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions