Skip to:
Content

BuddyPress.org

Opened 2 years ago

Closed 2 years ago

#7599 closed enhancement (fixed)

field id not passed to pre_validate_filter

Reported by: mechter Owned by: djpaul
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9.0
Component: Extended Profile Keywords: has-patch
Cc:

Description

The field_id parameter introduced in [10203] isn't being passed by xprofile_filter_pre_validate_value_by_field_type to pre_validate_filter methods of field type objects.

Attachments (1)

7599.patch (632 bytes) - added by mechter 2 years ago.

Download all attachments as: .zip

Change History (5)

@mechter
2 years ago

#1 @mechter
2 years ago

  • Keywords has-patch added

#2 @DJPaul
2 years ago

  • Milestone changed from Awaiting Review to 3.0
  • Type changed from defect (bug) to enhancement

Hey @mechter
Welcome to BuddyPress trac. Thanks for your tickets, I'm looking at them now. ❤️

For this one, I think I'm going to pass all the method arguments to the event. That's what I tend to do, as it gives another developer all the raw inputs to work with that the calling code did. I can't quickly see a good pattern or reason just to pass the ID.

#3 @DJPaul
2 years ago

Ah, I see why field_id makes sense. Yes.

#4 @djpaul
2 years ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 11699:

xprofile: pass field ID to filters that modify submitted data before validation.

Fixes #7599

Props mechter

Note: See TracTickets for help on using tickets.