Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSOD opening Site Editor due to lack of trailing slash in http://domain/subdirectory?_wp-find-template=true #38699

Closed
bobbingwide opened this issue Feb 10, 2022 · 2 comments
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

Comments

@bobbingwide
Copy link
Contributor

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.

  1. Install WordPress 5.9
  2. Activate Twenty Twenty-Two
  3. Visit the site eg. http://217.199.187.57/scalar-wp-dev32.co.uk/
  4. Click on the "home" link or visit http://217.199.187.57/scalar-wp-dev32.co.uk
  5. If you get a 404 then continue. If not revisit the pre-requisite
  6. Login and choose Edit site or Appearance > Editor beta
  7. It should fail with a WSOD.
  8. View the console log. See the 404

Screenshots, screen recording, code snippet

#image

Environment info

  • WordPress 5.9
  • Theme: Twenty Twenty-Two
  • Problem occurs with / wthout Gutenberg 12.5.4

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

@bobbingwide
Copy link
Contributor Author

bobbingwide commented Feb 10, 2022

An update from the person who has the problem.

  1. It occurs with Heart Internet
  2. It occurs with "domain references"
  3. He can't use FSE for staging, test or dev sites; only with live domains !

He has 140 sites on Heart Internet using domain references.

Heart Internet's position is...

"This case has been reviewed by my senior colleagues and there currently aren't any issues with the hosting package that'll cause that part of the admin area not to work. I could be an issue with the corefiles for scalar-wp-dev32.co.uk."

Followed up with..

I've consulted with my senior colleagues and in the current case it wouldn't be advisable to use temp URL.
An alternative is to edit the hosts file on your computer
( https://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/ )
In general, WordPress has issues with temp URLs due to the use of permalinks.

@Mamaduka Mamaduka added [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Bug An existing feature does not function as intended labels Feb 22, 2022
@youknowriad
Copy link
Contributor

I think #48363 fixed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants