Opened 10 years ago
Closed 10 years ago
#29191 closed defect (bug) (fixed)
Notice when activating an account on a multisite config
Reported by: | imath | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 4.0 |
Component: | Networks and Sites | Keywords: | needs-patch |
Focuses: | multisite | Cc: |
Description
Hi,
Since [28373], when a user clicks on the account activation url (eg: site.url/wp-activate.php?key=key
) from the activation email he received, the activation page is throwing a notice:
Notice: Undefined index: blog_id in path_to\wp-activate.php on line 108
Applying the diff attached to this ticket seems to avoid this notice.
Attachments (1)
Change History (7)
#4
@
10 years ago
If it can help, i think i should detail a bit more how i got the notice.
I've added a new user from the /wp-admin/user-new.php of the root blog of the network. In this screen the form let you set the login, the mail, the role and whether to skip confirmation email or not. I've left the noconfirmation checkbox empty.
So i think, in this case, that wpmu_signup_blog()
is not used but only wpmu_signup_user()
.
Then the email was sent to the user. And when the user clicks on the activation link, he arrives on /wp-activate.php and gets his login, password..
I think, in my case, that wpmu_activate_signup()
stops at line 1038 with :
return array( 'user_id' => $user_id, 'password' => $password, 'meta' => $meta );
So no blog_id argument in the returned array.
I don't think 29191.diff addresses the wider issue of why
blog_id
would be set but null. We know, for instance, thatblog_id
is directly set in the$result
array returned fromwpmu_activate_signup()
, So the problem has to be inwpmu_create_blog()
or further down the line.As many Multisite functions simply fallback to the current blog ID when
$blog_id
is null, it's not surprising this just popped up after removing theextract()
in [28373].