Skip to content

Attribute value was duplicated after upgrade magento from 2.1 to 2.3 #28326

Closed
@thanhdv2811

Description

@thanhdv2811

Preconditions (*)

  1. Our Database was migrated from magento 1 to magento 2.1 few years ago
  2. All the site is running normally in the version 2.1

Steps to reproduce (*)

  1. Composer update from magento 2.1.17 to magento 2.3.4
  2. Disable all the 3rd party extension
  3. Run Magento command setup:upgrade

Expected result (*)

  1. The attribute value in the table catalog_product_entity_datetime, catalog_product_entity_decimal, catalog_product_entity_int should be the same as before
    2.This is an example data of product 7120 in the table catalog_product_entity_datetime.
    Selection_043

Actual result (*)

  1. After the update command, those data were duplicated
  2. This is an example data of product 7120 after update command in the table catalog_product_entity_datetime
    Selection_044

As I checked in the Magento code, magneto added a patch to upgrade website attribute vendor/magento/module-catalog/Setup/Patch/Data/UpgradeWebsiteAttributes.php
This patch inserts the attribute value by store view for this table list

private $tableMetaDataClass = [
        'catalog_category_entity_datetime' => CategoryInterface::class,
        'catalog_category_entity_decimal' => CategoryInterface::class,
        'catalog_category_entity_int' => CategoryInterface::class,
        'catalog_category_entity_text' => CategoryInterface::class,
        'catalog_category_entity_varchar' => CategoryInterface::class,
        'catalog_product_entity_datetime' => ProductInterface::class,
        'catalog_product_entity_decimal' => ProductInterface::class,
        'catalog_product_entity_int' => ProductInterface::class,
        'catalog_product_entity_text' => ProductInterface::class,
        'catalog_product_entity_varchar' => ProductInterface::class,
    ];

Selection_045


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • 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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions