Skip to content

catalog_product_flat_data for store view populated with default view data when it should be store view data #21747

@bengower

Description

@bengower

Preconditions (*)

  1. A Magento CE 2.3 installation with multiple websites setup (I have four websites each setup with one store and one store view).
  2. Add a custom product attribute (Attribute A) with a ‘Catalog Input Type for Store Owner’ of Text Field, ‘Scope’ of Store View, ‘Allow HTML Tags on Storefront’ of Yes and ‘Used in Product Listing’ of Yes. Add it to an Attribute Set.
  3. Create a product (Product A) that uses the attribute set with this custom attribute in it. Add this product to all websites and enable it on all websites.
  4. Enable ‘Use Flat Catalog Product’ in Store > Configuration > Catalog > Catalog in the Storefront section.

Steps to reproduce (*)

  1. I open to edit Product A from Catalog > Products and add some text (‘Multi-buy Offer’) to the default view in Attribute A as I would like this text to appear on all but one site and then save.
  2. I then change the store view to that of one of the other store views (Store View 3). I go to Attribute A and untick ‘Use Default Value’ I then make sure the value of the Attribute A field is empty (just for this store view) and save.
  3. I then make sure that the indexes are up to date with the latest changes.

Expected result (*)

  1. The catalog product flat data table in the DB for the Store View 3 in the row for Product A contains Attribute A showing the empty value that was set for Store View 3.

Actual result (*)

  1. The catalog product flat data table in the DB for the Store View 3 in the row for Product A contains Attribute A but it shows the Default View value instead of empty value that was set for Store View 3.
  2. This incorrect value then appears on the frontend of the website associated with Store View 3

Disabling ‘Use Flat Catalog Product’ shows the correct data in Store View 3.

Metadata

Metadata

Assignees

Labels

Component: IndexerEvent: cdkyiv2019Fixed 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