Skip to:
Content

BuddyPress.org

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#7155 closed enhancement (no action required)

More numeric strings in class `BP_XProfile_Field`.

Reported by: DJPaul Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Extended Profile Keywords: has-patch
Cc:

Description

 object(BP_XProfile_Field)[884]
          public 'id' => string '87' (length=2)
          public 'group_id' => string '8' (length=1)
          public 'parent_id' => string '0' (length=1)
          public 'is_required' => string '0' (length=1)
          public 'can_delete' => string '1' (length=1)
          public 'field_order' => string '1' (length=1)
          public 'option_order' => string '0' (length=1)
          public 'is_default_option' => string '0' (length=1)
          protected 'member_types' => null

Attachments (1)

7155.diff (1.4 KB) - added by DJPaul 4 years ago.

Download all attachments as: .zip

Change History (6)

@DJPaul
4 years ago

#1 @DJPaul
4 years ago

  • Keywords has-patch added

Patch attached, but not complete yet. There will be problems for existing sites with object cache, when combined with existing strict type-checking elsewhere, xprofile group queries will return nothing (for some reason; didn't fully track it down).

We need to clear all keys like wp_cache_delete( <all group IDs, 'bp_xprofile_groups' );` on 2.7 update.

If? I ever sit down and figure out what exactly we're storing in what cache groups across BuddyPress, I'd seriously look into providing some hardcoded prefix before the object key, so we can "invalidate" them easily.

#2 @r-a-y
4 years ago

Also see my patch in #6977:
https://buddypress.trac.wordpress.org/attachment/ticket/6977/6977.03.patch

Ignore the activity component as that was already committed in v2.6.

Last edited 4 years ago by r-a-y (previous) (diff)

#3 @DJPaul
4 years ago

@r-a-y If you have a patch on that other ticket which has an almost-complete set of changes for this, how about just committing that for now? It's better than what we have now.

I like our patches for this particular ticket are basically the same, however I noticed you didn't catch the cache issue I mentioned. I think that one shows up if you run unit tests.

#4 @DJPaul
4 years ago

  • Milestone 2.7 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Closing in favour of #6977

#5 @r-a-y
3 years ago

Forgot to tag this ticket. r11030 should address this one.

however I noticed you didn't catch the cache issue I mentioned. I think that one shows up if you run unit tests.

I tried to cast integers after the cache is fetched, so the unit tests wouldn't fail.

I guess the issue would appear if someone is directly referencing the cache with a wp_cache_get() call.

Note: See TracTickets for help on using tickets.