Skip to content

Problems update attribute with rest API #5963

Closed
@CodeGlitcher

Description

@CodeGlitcher

Preconditions

  1. Install Magento 2.1.0

Steps to reproduce

  1. Create a selectable attribute.
    image
  2. Update the attribute with the rest api

put /rest/V1/products/attributes/{attribute_code}
body:

{
    "attribute":
        {

              "attribute_id": 192,
              "default_frontend_label": "Color2"
        }
}

Expected result

  1. The default frontend label is set to Color2

Actual result

  1. An new empty option is added to the attribute
    image

Sending an empty options array has the same result.

{
    "attribute": {
        "attribute_id": 192,
        "attribute_code": "color",
        "default_frontend_label": "Color2",
        "options": []
    }
}

Another little thing. If you update the attribute labels using frontend_labels:

{
    "attribute": {
        "attribute_id": 192,
        "attribute_code": "color",
                "default_frontend_label": "color",
        "frontend_labels": [
        {
            "store_id": 1,
            "label": "kleur"
        },
        {
            "store_id": 2,
            "label": "test"
        }]
    }
}

the field default_frontend_label is ignored.

Metadata

Metadata

Labels

Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions