[wp-trac] [WordPress Trac] #57100: "View Site" link in Editor leads to 404 page if home url is not same as site url

WordPress Trac noreply at wordpress.org
Mon Nov 14 09:39:38 UTC 2022


#57100: "View Site" link in Editor leads to 404 page if home url is not same as
site url
------------------------------+-----------------------------
 Reporter:  aliakseyenkaihar  |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Editor            |    Version:  6.1
 Severity:  minor             |   Keywords:
  Focuses:  administration    |
------------------------------+-----------------------------
 I'm using [Bedrock](https://roots.io/bedrock/) structure for site project
 so return value of `home_url() === 'domain.com'` is not same as
 `site_url() === 'domain.com/wp'`

 So if you go to Appearance -> Editor -> Site and click View -> View Site
 (top right corner) it will leads to `domain.com/wp` instead of
 `domain.com` and will be resolved in 404 response preview page

 My proposition is to change site url into home url
 [here](https://github.com/WordPress/WordPress/blob/master/wp-admin/site-
 editor.php#L72)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57100>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list