Skip to:
Content

BuddyPress.org

Opened 2 years ago

Closed 2 years ago

#9130 closed defect (bug) (fixed)

BP_XProfile_Field Update Sets parent_id to 0

Reported by: munklefish Owned by: espellcaste
Priority: highest Milestone: 14.0.0
Component: Extended Profile Version:
Severity: normal 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.


2 years ago
#1

  • Keywords has-patch has-unit-tests added

#2 @espellcaste
2 years ago

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

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

#3 @espellcaste
2 years ago

  • Resolution → fixed
  • Status assigned → 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.