-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: CatalogFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedGate 1 Failed. Automatic verification of issue format is failedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report
Description
Steps to reproduce
- Override this template in a theme 'Magento_Catalog/templates/product/view/review.phtml`
- Change the last parameter in the getReviewsSummaryHtml method to false so the method call in the template looks like this
<?php echo $block->getReviewsSummaryHtml($block->getProduct(), false, false)?>
Expected result
- A reviews summary will only be displayed for products that have ratings
Actual result
- A reviews summary is not displayed for any products; even ones that do have ratings.
Additional Information
- Set a break point on the first line of the
getReviewsSummary()
method in the class\Magento\Review\Block\Product\ReviewRenderer
- Load the product detail page of a product that has a rating
- Evaluate this expression once your breakpoint is hit
$product->getRatingSummary()
- It will always evaluate to null even with a product has a rating. Because of this, when $displayIfNoReviews is set to false, the if statement in which this line lives will evaluate to true and an empty string will be returned.
Metadata
Metadata
Assignees
Labels
Component: CatalogFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedGate 1 Failed. Automatic verification of issue format is failedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report