Opened 13 years ago
Closed 4 weeks ago
#20116 closed defect (bug) (worksforme)
Welcome User Email in Multisite Can't Be Changed
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.3 |
Component: | Login and Registration | Keywords: | has-patch fixed-minor needs-testing |
Focuses: | multisite | Cc: |
Description
Reproduced this on 3.3 and 3.4-aortic.
Go to /wp-admin/network/settings.php
Add 'New' to the sentance 'Welcome User' to make it 'Welcome New User'
Hit update.
Page refreshes, text does not change.
Attachments (5)
Change History (23)
#2
@
13 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 3.4
It's 'Dear User' indeed, but I guess Ipstenu refers to welcome_user_email
option:
http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/ms-functions.php#L1897
I can reproduce the bug in trunk. Seems introduced in [18588].
Since default welcome_user_email
is implemented via a filter, update_site_option()
doesn't call add_site_option()
and then fails to update a non-existing option.
We should get rid of welcome_user_msg_filter()
and make welcome_user_email
a proper option, like welcome_email
.
#3
@
13 years ago
Erf, yeah, Dear User, but that's what I meant. Sorry, trying to do trac and give directions on the phone is a bad idea.
#4
follow-up:
↓ 5
@
13 years ago
- Milestone changed from 3.4 to 3.3.2
I think we could drop the ms-functions.php changes in the 3.3 branch. However, let's not remove a function entirely in case someone is using it. (In a branch, keep as is, I'd say.)
#5
in reply to:
↑ 4
@
13 years ago
Replying to nacin:
However, let's not remove a function entirely in case someone is using it.
20116.2.patch moves welcome_user_msg_filter()
to ms-deprecated.php
.
#6
@
13 years ago
So I finally looked at the root issue. The option does not exist, but when update_site_option() calls get_site_option(), it is told that it has a value, thanks to the filter. So instead of passing things off to add_site_option() to do an insert, it does an update, and there's now row with that option name to update.
That is lame, and affects get_option/update_option as well. I think we need *option_exists() methods in the future as a way to skip the filters in get_*.
Regardless, I came up with a targeted fix for the 3.3 branch. Attached.
#8
follow-up:
↓ 9
@
13 years ago
For trunk, I'd like to go along with something like 20116.2.diff. However, populate_network() only runs when the network is initially created. We should add some code to upgrade_network().
Since this is going to mean we are repeating this email three times, maybe we can just repurpose welcome_user_msg_filter(). Make $text default to false and then welcome_user_msg_filter() can just give us our email content. Perhaps too hacky, but it's an idea.
#9
in reply to:
↑ 8
@
13 years ago
Replying to nacin:
However, populate_network() only runs when the network is initially created. We should add some code to upgrade_network().
Yeah, I forgot that without adding the option, the textarea on Network Settings screen would be empty, although wpmu_welcome_user_notification()
would still get the proper text.
Make $text default to false and then welcome_user_msg_filter() can just give us our email content.
Done in 20116.3.patch.
#15
@
11 years ago
- Component changed from Multisite to Login and Registration
- Focuses multisite added
#17
@
10 years ago
This is working on trunk right now. This can be closed unless someone else finds a problem.
#18
@
4 weeks ago
- Resolution set to worksforme
- Status changed from new to closed
Reproduction Report
Description
❌ This report can't validate that the issue can be reproduced nowadays
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 7.4.33
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 7.4.33)
- Browser: Chrome 137.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- ❌ Error condition does not occur any more.
Additional Notes
- As @Ipstenu suggested back in the day, this has been already solved in future versions.
- Closing as
worksforme
Isn't it 'Dear User'? http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/ms.php#L213
Tested in 3.3 and current trunk, works in both.