magento2
magento2 copied to clipboard
Catalog Page Empty if "Allow All Products Per Page" is set to "Yes"
Preconditions and environment
- Magento 2.4.5
Steps to reproduce
Deploy 2.4.5 vanilla
Create Test Category
Create Test Product in test category
Browse to test category page on frontend and ensure product is visible.
Set Allow All Products Per Page setting (Config -> Catalog -> Catalog) to Yes
Clear Cache Browse to test category page on frontend and ensure product is visible.
Expected result
Product is visisble
Actual result
Product is not visible
Additional information
No response
Release note
The Category Page is no longer empty when "Allow All Products Per Page" is set to "Yes".
Triage and priority
- [ ] Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- [X] 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”.
Hi @gwharton. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
- Summary of the issue
- Information on your environment
- Steps to reproduce
- Expected and actual results
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, review the Magento Contributor Assistant documentation.
Add a comment to assign the issue: @magento I am working on this
To learn more about issue processing workflow, refer to the Code Contributions.
- Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
@magento give me 2.4-develop instance
Hi @gwharton. Thank you for your request. I'm working on Magento instance for you.
Hi @gwharton, here is your Magento Instance: https://80580bda8b630bcd60edf378d7ee89cc.instances.magento-community.engineering Admin access: https://80580bda8b630bcd60edf378d7ee89cc.instances.magento-community.engineering/admin_f594 Login: 9819800a Password: 60d983aa6b1d
Confirmed on magento test instance.
Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x
, ^Area:.*
Once all required labels are present, please add Issue: Confirmed
label again.
Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x
, ^Area:.*
Once all required labels are present, please add Issue: Confirmed
label again.
:x: Something went wrong. Cannot create Jira issue.
:x: Something went wrong. Cannot create Jira issue.
@magento give me 2.4-develop instance
Hi @Kannakiraj123. Thank you for your request. I'm working on Magento instance for you.
Hi @Kannakiraj123, here is your Magento Instance: https://80580bda8b630bcd60edf378d7ee89cc.instances.magento-community.engineering Admin access: https://80580bda8b630bcd60edf378d7ee89cc.instances.magento-community.engineering/admin_2746 Login: a54924a7 Password: c03bb7174b87
Workaround:
Override limiter.phtml
in your theme:
app/design/frontend/Your/Theme/Magento_Catalog/templates/product/list/toolbar/limiter.phtml
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<?php
/**
* Product list toolbar
*
* @var \Magento\Catalog\Block\Product\ProductList\Toolbar $block
* @var \Magento\Framework\Locale\LocaleFormatter $localeFormatter
*/
?>
<div class="field limiter">
<label class="label" for="limiter">
<span><?= $block->escapeHtml(__('Show')) ?></span>
</label>
<div class="control">
<select id="limiter" data-role="limiter" class="limiter-options">
<?php foreach ($block->getAvailableLimit() as $_key => $_limit):?>
<option value="<?= $block->escapeHtmlAttr($_key) ?>"
<?php if ($block->isLimitCurrent($_key)):?>
selected="selected"
<?php endif ?>>
<?= $block->escapeHtml($_limit) ?>
</option>
<?php endforeach; ?>
</select>
</div>
<span class="limiter-text"><?= $block->escapeHtml(__('per page')) ?></span>
</div>
Having the same issue, apparently the $localeFormatter (which is new in 2.4.5) is not passed to the product/list/toolbar/limiter.phtml template or any other template like product/list/toolbar/amount.phtml or product/price/tier_prices.phtml at all.
Upgrading a webshop to 2.4.5 gives me the error: Warning: Undefined variable $localeFormatter in /var/www/html/vendor/magento/module-catalog/view/frontend/templates/product/list/toolbar/limiter.phtml on line 26
Whilst my error was on Line 26, it was because it was trying to parse the phrase "All" as an int. It was expecting all entries of the limiter to be an integer number which it isnt when the setting is set.
I don't seem to be experiencing the $localeFormatter issue which I suspect will be independent of whether the setting is set or not.
@gwharton Same in my case.
:x: Something went wrong. Cannot create Jira issue.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-6384 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @sidolov. Thank you for verifying the issue.
Issue Available: @sidolov, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
:x: Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-6384
:x: Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-6384
Closed without a comment?
But I see one commit mentioning AC-6384
: https://github.com/magento/magento2/commit/bb55549cd3016987663272e7ffe3f452c8d6e40d, so that's probably the fix
PR is here https://github.com/magento/magento2/pull/35987
Which got closed with a comment:
Resolved internally
Hello,
As I can see this issue got fixed in the scope of the internal Jira ticket AC-6384 by the internal team Related commits: https://github.com/magento/magento2/search?q=AC-6384&type=commits
Based on the Jira ticket, the target version is 2.4.6.
Thanks
I had the same issue. Can confirm that PR #35987 solves the pagination loading issue.
@dragonfly4, the official fix (which is a better one), is over here: https://github.com/magento/magento2/commit/bb55549cd3016987663272e7ffe3f452c8d6e40d
This was obviously patched before 2.4.5-p1 was published but was omitted from the release. If it's due to be published in 2.4.6 like mentioned by @engcom-Hotel this would mean that there won't be a fix before 2.4.5-p2/2.4.6 and the open source release in March 2023. That's quite a long time for a quick fix.