Skip to content

Update category attribute isActive fails with REST, "URL key for specified store already exists." #3543

Closed
@Widmayer

Description

@Widmayer

I added a category with the following REST-call:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Bearer abcd' -d '{
"category": {
"parentId": 2,
"name": "TestCategory",
"isActive": false
}
}' 'http://0.0.0.0/index.php/rest/default/V1/categories'

When I try to update the attribute "isActive" to true with the same call I get an error:

{
"message": "Could not save category: %1",
"parameters": [
"URL key for specified store already exists."
]
}

When I try to use the PUT method with the following command:
curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Bearer abcd' -d '{
"category": {
"name": "TestCategory",
"isActive": true
}
}' 'http://0.0.0.0/index.php/rest/default/V1/categories/76'
I get the error:
{
"message": "Could not save category: %1",
"parameters": [
"The value of attribute "is_active" must be set"
]
}

is_active is set, so I think this is a bug.
Any hints how to update a category attribute with REST?

Regards,
Tobias

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