Skip to content

Can't save product attribute: Attribute code is invalid. #10172

@hoangnm89

Description

@hoangnm89

Preconditions

  1. Magento 2.1.6
  2. php 5.6
  3. mysql 5.6

Steps to reproduce

  1. Create new product attribute:
    Title: physical specification - Weight (g)
    Attribute Code: specs_weight
  2. Press Save and Continue Edit => successfully
  3. Change Title of attribute to: Physical Specification - Weight (g) (uppercase: P and S)

Expected result

  1. It should change title to new one: Physical Specification - Weight (g)

Actual result

It can't save and thrown: Attribute code "attr_physical_specification_weight_" is invalid. Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.
alt text

here is some more attributes get same problem:
Speaker - Subwoofer Type ( Active / Passive / Wireless, Bulit-in )
Connectivity - ARC (Audio Return Channel)
Audio Feature - Bluetooth HI-FI Codec

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Format is validGate 1 Passed. Automatic verification of issue format passed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions