Skip to content

#12717 - Catalog Products List widget is not displayed on Storefront #12765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 7, 2018

Conversation

RostislavS
Copy link
Contributor

@RostislavS RostislavS commented Dec 15, 2017

Description

Problem is that when flats are enabled, logic does not check if an attribute is actually present in flat table. Added a check that the attribute is in flat and if not, we join this attribute.

Fixed Issues (if relevant)

  1. Catalog Products List widget is not displayed on Storefront #12717: Catalog Products List widget is not displayed on Storefront

Manual testing scenarios

Go to Stores > Attributes > Product and open "Color" attribute
Create 2 options red and black
Add this attribute to attribute set
Create 2 simple products with red and black attributes
Go to Stores> Configuration > CATALOG > Catalog > Storefront
Set "Use Flat Catalog Category" = Yes and "Use Flat Catalog Product" = "Yes"
Go to Content > Widgets and create new widget with:
Storefront Properties
Widget Title = Test widget
Assign to Store Views = All Store Views
Layout Updates:
-- Display on = All Pages
-- Container = Main Content Area
Widget Options

Title = test
Number of Products to Display = 10
Conditions: Color is red
run
rm -rf var/* pub/static/* generated/*
php bin/magento indexer:reindex
php bin/magento setup:static-content:deploy
Go to Storefront
Expected result

Widget is visible on Storefront

Actual result

Widget is not visible on Storefront, following error persists in support_report.log:
report.CRITICAL: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'at_color.value' in 'where clause', query was: SELECT COUNT(DISTINCT e.entity_id) FROM catalog_product_flat_1 AS e
INNER JOIN catalog_category_product_index AS cat_index ON cat_index.product_id=e.entity_id AND cat_index.store_id='1' AND cat_index.visibility IN(2, 4) AND cat_index.category_id='2'
INNER JOIN catalog_product_index_price AS price_index ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0 WHERE (((IFNULL(at_color.value, 0) = '13') ))

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Dec 15, 2017

CLA assistant check
All committers have signed the CLA.

@magento-engcom-team magento-engcom-team added bugfix Component: Catalog mageconf Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release labels Dec 15, 2017
@RostislavS RostislavS requested a review from mslabko December 18, 2017 23:00
@dmanners dmanners self-assigned this Feb 1, 2018
@dmanners dmanners added this to the February 2018 milestone Feb 1, 2018
@dmanners
Copy link
Contributor

dmanners commented Feb 1, 2018

Hi @RostislavS sorry for the delay in processing this pull request. I will have a look at it now and get back to you if I need any thing more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants