Skip to content

Product attributes product_type, type_id cannot be created/edited form admin #28479

Closed
@IgorM92

Description

@IgorM92

Preconditions (*)

  1. Magento 2.3.5-p1

Steps to reproduce (*)

  1. IF product attributes with following code does not exist product_type or type_id then attempt to create any of them
  2. ELSE edit any of them and change anything

Expected result (*)

  • Attribute is not saved. Error message is shown
  • text: Code "product_type" is a reserved key and cannot be used as attribute code.
  • text: Code "type_idis" a reserved key and cannot be used as attribute code.

Actual result (*)

  1. Either of following messages appear An attribute with this code already exists. OR An attribute with the same code (product_type) already exists.
    product_type
    type_id

It's due to following line of code

if ($attribute->getId() && !$attributeId || $attributeCode === 'product_type' || $attributeCode === 'type_id') {
implemented in ca0da34#diff-9ff38a88c1abf86286f77b64c8bc9b38 and b9d13e6#diff-9ff38a88c1abf86286f77b64c8bc9b38


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

Labels

Component: AdminFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: 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 developmentPriority: P3May be fixed according to the position in the backlog.Progress: doneReported on 2.3.5-p1Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S4Affects aesthetics, professional look and feel, “quality” or “usability”.Triage: DoneHas been reviewed and prioritized during Triage with Product Managers

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions