Opened 3 years ago
Closed 3 years ago
#8524 closed defect (bug) (fixed)
"item_id" is not saved when updating an activity that belongs to a group using the REST endpoint
Reported by: | oddev56 | Owned by: | espellcaste |
---|---|---|---|
Milestone: | 10.0.0 | Priority: | normal |
Severity: | normal | Version: | 8.0.0 |
Component: | REST API | Keywords: | |
Cc: |
Description
BuddyPress version 8.0.0.
When using the REST endpoint for updating an activity with component set to "groups" the "item_id" (sent in the "primary_item_id" argument) is not being correctly set in the $prepared_activity object, and is set to 0 when the activity is created via the call to "bp_activity_add" in the "update_item" function.
The cause of this issue resides in the "prepare_item_for_database" function, where the "$prepared_activity->item_id" is only set when the activity component doesn't belong to a group.
When it belongs to a group, the "$prepared_activity->group_id" is set to the "item_id", and this value isn't used for setting the "item_id" in the "bp_activity_add" function.
Line 1039-1050.
This issue impedes the use of the REST endpoint for updating group component activities, therefore blocking our ability to add edit functionality until it is resolved.
Change History (7)
#1
@
3 years ago
- Owner set to espellcaste
- Severity changed from blocker to normal
- Status changed from new to assigned
#4
@
3 years ago
- Milestone changed from Awaiting Review to 10.0.0
Let's make sure to fix this during 10.0.0 dev cycle.
#5
@
3 years ago
Patch available here: https://github.com/buddypress/BP-REST/pull/423
#7
@
3 years ago
- Resolution set to fixed
- Status changed from assigned to closed
Pull request was merged and will be available at BuddyPress version 10.0.0.
Hi thanks for your feedback. I thought we fixed this issue. @espellcaste could you have a look at it?