Opened 7 years ago
Closed 7 years ago
#42597 closed defect (bug) (fixed)
Term Already Exists Error No Longer Returns Term ID
Reported by: | coleh | Owned by: | rachelbaker |
---|---|---|---|
Milestone: | 4.9.3 | Priority: | normal |
Severity: | normal | Version: | 4.9 |
Component: | REST API | Keywords: | has-patch has-unit-tests fixed-major |
Focuses: | Cc: |
Description
This ticket #41370 appears to have changed the error response for when a term already exists.
However, it used to return the term ID of the term inside the error data.
It no longer does that. The reason for needing this is if you are attempting to create a post on another site that has a category/tag that already exists, it will return the term ID so you can use that inside the post creation to properly set the taxonomy IDs of the newly created post.
Attachments (2)
Change History (14)
#2
@
7 years ago
- Keywords has-patch has-unit-tests added
@swissspidy Good catch on the duplicate, didn't notice this ticket.
Patch added that adds term_id to the 'data' array in the response. This isn't 100% backward compatible with 4.8.3, but I don't think we can change the HTTP status code in the response without adding the 'status' key w/ add_data(). Open to suggestions.
This ticket was mentioned in Slack in #core-restapi by timothybjacobs. View the logs.
7 years ago
#4
@
7 years ago
- Owner set to rachelbaker
- Resolution set to fixed
- Status changed from new to closed
In 42350:
#6
@
7 years ago
Thanks for addressing this issue.
Any reason this is being slated for 5.0 which could be months away? This was a feature that worked previous to 4.9 and now doesn't work properly with 4.9 and could potentially break applications using the REST API as ours is broken. I am just trying to understand why this wouldn't have been included with 4.9.1 or a next minor release to fix a very small bug that broke functionality with the API response?
#7
@
7 years ago
Agree with @coleh, this ticket addressed a regression. @netweb Could we target this fix for the next minor release?
#8
@
7 years ago
- Milestone changed from 5.0 to 4.9.2
- Resolution fixed deleted
- Status changed from closed to reopened
Makes sense @shooper and @shooper, moving to the 4.9.2 milestone and reopening for backporting
#42600 was marked as a duplicate.