Skip to:
Content

#5569 closed defect (bug) (duplicate)

failure to update to 2.0 caused by using get_users in bp_update_to_2_0()

Reported by: megainfo Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: API - Update/Install Keywords: close
Cc:

Description

calling get_users in bp_update_to_2_0() generates a memory limit exceeded or the query is large results when the users table is big( tested on production site with more than 20000 members and the update to 2.0 fail.
With memory limit 128MB).

Change History (4)

comment:1 @imath12 months ago

  • Keywords reporter-feedback added

Hi megainfo

Thanks for your feedback, i have a very specific question, can you tell me if you have users with a user_status set to 0 and a user meta activation_key that exists (no matter if the value is empty or not).

And if so how many users ?

comment:2 follow-up: @megainfo12 months ago

Using the code bellow

SELECT count(u.ID) FROM wp_users as u 
LEFT JOIN wp_usermeta as um ON u.ID = um.user_id
where u.user_status = 0 and um.meta_key = 'activation_key';

result count is 9972.

Last edited 12 months ago by megainfo (previous) (diff)

comment:3 in reply to: ↑ 2 @imath12 months ago

  • Keywords close added; reporter-feedback removed

Replying to megainfo:

result count is 9972.

Ok, i was feeling it was the problem, thanks a lot for your feedback.

On a non multisite config, the 2.0 upgrade process is trying to figure out the 'users' that are not yet users but signups. To do so it's requesting "'activation_key' exists ?". When a user is activating his account, BuddyPress is deleting this meta. That's why i've chosen this way to identify signups.

It appears, i had a bad idea (i'm really sorry for the inconvenience) as some plugins are "retaining" the 'activation_key' user meta (or simply empty its value), so i think you're issue is a side effect of #5553.

We're working on a patch for next 2.0.1.

I suggest you wait for 2.0.1. If you want help us, it would be great if you could test on a clone of your website if 5553.05.diff patch would fix your issue.

If you're ok with my analysis, i'll close this ticket as possibly a "duplicate" of #5553

comment:4 @DJPaul12 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.