Opened 10 years ago
Closed 10 years ago
#34071 closed defect (bug) (fixed)
Incorrect site URL in email templates
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.3 |
Component: | Users | Keywords: | has-patch |
Focuses: | Cc: |
Description
I've installed wordpress press in another directory and my url to admin page become http://mysite.com/my_folder/wp-admin, and my site works from http://mysite.com url. In settings page look like that:
WordPress Address (URL) http://mysite.com/my_folder
Site Address (URL) http://mysite.com
But in email notifications my site url is http://mysite.com/my_folder , but must be http://mysite.com
Attachments (1)
Change History (9)
#1
@
10 years ago
- Focuses administration template performance removed
- Keywords reporter-feedback added
- Summary changed from Email template to Incorrect site URL in email templates
#2
@
10 years ago
Replying to SergeyBiryukov:
Yes it's still happen in native wordpress email template (Password Change Notification) at the bottom of email:
*
*
*
Regards,
All at «My site name»
http://mysite.com/my_folder
It seems that function instead of home_url returns site_url
#3
@
10 years ago
- Component changed from Mail to Users
- Keywords needs-patch added; reporter-feedback removed
- Milestone changed from Awaiting Review to 4.4
- Version changed from 4.3.1 to 4.3
So, there are 4 instances of that template:
- update_option_new_admin_email()
- send_confirmation_on_profile_email()
- wp_update_user(), 1
- wp_update_user(), 2
The first two use network_home_url()
and appear to be unaffected.
The second two use get_option( 'siteurl' )
and should probably use home_url()
instead.
Introduced in [32820].
#4
@
10 years ago
- Keywords has-patch added; needs-patch removed
- Status changed from new to closed
+1.
The above patch fixes this issue as @SergeyBiryukov suggested. This addresses the wrong site URL in the user update email notifications in the cases when there is a difference between the site URL (the WordPress Address (URL) option) and home URL (the Site Address (URL) option).
Side note: There are several more occurences of get_option( 'siteurl' )
that might need to be updated to use home_url()
as well. IMHO they are worth the investigation.
#5
@
10 years ago
- Status changed from closed to reopened
@tyxla a ticket is only closed once it's been committed to core. :)
Hi @ramay, welcome to Trac!
Could you clarify which email notifications in particular have the incorrect URL?
Does the issue still happen with all plugins disabled and a default theme (Twenty Fifteen) activated?