Opened 6 years ago
Closed 6 years ago
#44396 closed defect (bug) (fixed)
Inconsistent use of blogname and sitename in Privacy emails
Reported by: | desrosj | Owned by: | flixos90 |
---|---|---|---|
Milestone: | 4.9.8 | Priority: | normal |
Severity: | normal | Version: | 4.9.6 |
Component: | Privacy | Keywords: | fixed-major |
Focuses: | multisite | Cc: |
Description
In the core privacy email notifications, there is inconsistent use of get_option( 'blogname' )
and get_option( 'sitename' )
.
In _wp_privacy_send_erasure_fulfillment_notification()
and _wp_privacy_send_request_confirmation_notification()
, the $email_data
array has an index for sitename
that is set to blog name. The subject is also set to blog name.
In wp_send_user_request()
, the $email_data
array has an index for site_name
that is set to the site name if on multisite, and blog name for single sites. Further down in the function, the blog name is always used for the email subject.
The value used for these should be consistent across all privacy emails.
Attachments (5)
Change History (22)
#2
@
6 years ago
I agree we should be consistent, my suggestion would be to use single-site terminology throughout. Even before the privacy-related changes in 4.9.6, there were inconsistencies, for example in send_confirmation_on_profile_email()
which used the network name in one place, but the site name for another place, both affecting the same email.
Since all of this so far does not really support a multisite-context yet, I think it makes sense to only use site scope at this point. Once we move forward with network-wide privacy control, we can enhance it as needed (for example there could be a parameter $network_wide
for those emails, or similar).
Last but not least, this context issue does not only affect the site name, but also the URL.
In 44396.2.diff I use get_option( 'blogname' )
and home_url()
throughout (instead of get_site_option( 'site_name' )
and network_home_url()
for the network). I also changed a variable name from $blogname
to $sitename
since we shouldn't be using the "blog" terminology any more, and that variable is being publicly exposed via a filter and its docs.
This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.
6 years ago
#5
@
6 years ago
44396.3.diff has some minor updates to ensure get_option( 'blogname' )
is only called once per function, and that it is always passed through wp_specialchars_decode()
.
This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.
6 years ago
#9
@
6 years ago
- Keywords fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened
This needs to be backported to 4.9.7.
#10
@
6 years ago
- Keywords needs-patch added; has-patch fixed-major removed
This is causing Travis failures.
#12
@
6 years ago
- Keywords fixed-major added; needs-patch removed
- Resolution fixed deleted
- Status changed from closed to reopened
#13
@
6 years ago
- Milestone changed from 4.9.7 to 4.9.8
4.9.7 has been released, moving to next milestone.
#14
@
6 years ago
- Keywords has-patch commit added
Noticed one more inconsistency in wp-admin/includes/file.php
. The email linking to the user's personal data export file is sent in wp_privacy_send_personal_data_export_email()
. 44396.4.diff has a fix for that.
Proposed patch