Skip to content

Importing unexpected data #40462

@wyw656141

Description

@wyw656141

Preconditions and environment

  • Magento version
    Magento version 2.4.7p7
  • Anything else that would help a developer reproduce the bug
    Firebear import/export extension installed but we use native import function
    Amasty Promotions Manager extension installed

Steps to reproduce

Step1:
Prepare two CSV files.
Sample CSV 1 for cleaning product label by SKU
sku,product_label
SKU0001,
SKU0002,
...
...

Sample CSV 2 for adding new cart sale rule
name,description,priority,rule_type,only_miniapp,private_store,exclude_saa,skus,discount_amount_condition,discount_amount,discount_percentage,simple_action,free_gifts,is_coupon_by_user,coupon_code,uses_per_coupon,uses_per_customer,is_trade_in,web_url,miniapp_url,auto_assign_coupon,auto_assign_by_customer_login,customer_login_from,customer_login_to,coupon_receive_date,active_coupon_after_receive,active_period_after_coupon_receive,start_time,end_time
20260121test,,0,default,No,"public,edu,epp",No,"SKU0001,SKU0002",,,,ampromo_items,"",No,,,,No,,,No,No,,,2026/1/30 9:00,No,,2026/1/30 9:00,2026/2/14 8:59

Step2:
Import csv1 in "System-Import-Entity Type(product update)" but only check data , not import.
In importexport_importdata table will have an new row with "0" status
id, entity, behavior, data, is_processed, updated_at
'25919', 'product_attribute_update', 'append', '[{"sku":"SKU0001","product_label":null},{"sku":"SKU0002","product_label":null},{"sku":"SKU0003","product_label":null}]', '0', '2026-01-23 12:09:52'

Step3:
Import csv2 in "System-Import-Entity Type(cart price rule)" and check data, you will see 2 rows in importexport_importdata, like this:

Image

Step4: if you click "import" button in csv2 page, all data in importexport_importdata will be import to sale rule table together.

Image Image Image

Expected result

Import operation only import currently selected "Entity Type" and csv data.

Actual result

all data in importexport_importdata with "0" status have been imported.

Additional information

In Magento 2.4.4p1, the importexport_importdata table is cleaned before each import. This avoids the problem. This issue occurred when we upgraded to 2.4.7p7

Release note

No response

Triage and priority

  • 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

Labels

Issue: needs updateAdditional information is require, waiting for responseReported on 2.4.7-p7Indicates original Magento version for the Issue report.

Type

No type

Projects

Status

Needs Update

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions