Skip to content

The recently viewed products widget does not work if the minicart block is removed #38132

Open
@jlballes

Description

@jlballes

Preconditions and environment

  • Magento enterprise edition, version 2.4.5-p4, installed by composer

Steps to reproduce

I have worked in a website that does not use the default cart and checkout of Magento. So:

  1. I have removed the minicart block from a default.xml in my theme (/app/design/frontend/[Vendor]/[theme_name]/Magento_Theme/layout/default.xml):
    <referenceBlock name="minicart" remove="true"/>

  2. I have added the "recently viewed products" widget in the product detail page from admin panel or by code from a layout XML file.

Expected result

The "recently viewed products" widget is shown in product detail page and works correctly.

Actual result

The "recently viewed products" widget is not shown, and there is not information in logs o in browser console.

If I remove the previous line that remove the minicart block, the "recently viewed products" widget works well.

I have found the exactly lines necessary in order to the widget works well. These lines are in the minicart template (vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml):
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], 'window.checkout = ' . /* @noEscape */ $block->getSerializedConfig(), false); ?>

In my opinion the relation between "recently viewed products" widget and minicart has not sense.

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: UI FrameworkComponent: WidgetIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: ready for devReported on 2.4.5-p4Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions