WSOD opening Site Editor due to lack of trailing slash in http://domain/subdirectory?_wp-find-template=true
#38699
Labels
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Feature] Themes
Questions or issues with incorporating or styling blocks in a theme.
[Type] Bug
An existing feature does not function as intended
Description
In a test environment created with Heart Internet, opening the site editor beta fails with a WSOD.
Analysis indicates this is due to the 404 returned for the following request
http://217.199.187.57/scalar-wp-dev32.co.uk?_wp-find-template=true
when there's a trailing slash after the subdirectory name the request works
http://217.199.187.57/scalar-wp-dev32.co.uk/?_wp-find-template=true
By default Heart Internet hosting doesn't support automatic 301 redirects for requests pointing to directories.
Visiting the "home" URL for this site also produces a 404 until the trailing slash is added.
http://217.199.187.57/scalar-wp-dev32.co.uk/
Note: This problem was analysed in bobbingwide/bobbingwide#49
There is some work in progress to better deal with 404's once they've happened.
I believe that changing the URL to include the trailing slash will be a better solution for this specific problem.
Step-by-step reproduction instructions
Pre-requisite: Create a hosting environment which doesn't support automatic 301 redirects when visiting a subdirectory.
http://217.199.187.57/scalar-wp-dev32.co.uk/
http://217.199.187.57/scalar-wp-dev32.co.uk
Screenshots, screen recording, code snippet
#
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: