Skip to:
Content

BuddyPress.org

Opened 7 months ago

Closed 7 months ago

#9130 closed defect (bug) (fixed)

BP_XProfile_Field Update Sets parent_id to 0

Reported by: munklefish's profile munklefish Owned by: espellcaste's profile espellcaste
Milestone: 14.0.0 Priority: highest
Severity: normal Version:
Component: Extended Profile Keywords: has-patch has-unit-tests
Cc:

Description

Hi,

When updating an existing xprofile field option using

new BP_XProfile_Field 

the updated option has it's parent_id set to 0 and thus becomes disassociated from its XProfile parent field.

Looking at the code for BP_XProfile_Field it appears on line 453 that the parent_id is hardcoded to 0 and ignores the data sent to the function.

Change History (3)

This ticket was mentioned in PR #267 on buddypress/buddypress by renatonascalves.


7 months ago
#1

  • Keywords has-patch has-unit-tests added

#2 @espellcaste
7 months ago

  • Component changed from Core to Extended Profile
  • Milestone changed from Awaiting Review to 14.0.0
  • Owner set to espellcaste
  • Status changed from new to assigned

I was able to confirm the bug and added a fix. :)

#3 @espellcaste
7 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 13792:

A BP_XProfile_Field update does not disassociate from its XProfile parent field.

This patch makes sure that when updating an existing XProfile field option using the save() method from the BP_XProfile_Field class,
the updated option has not the parent_id set to 0, thus becoming disassociated from its XProfile parent field.

Closes https://github.com/buddypress/buddypress/pull/267
Fixes #9130

Note: See TracTickets for help on using tickets.