#52547 closed defect (bug) (fixed)
async loopback site health test fails on alternative setups
| Reported by: | Levdbas | Owned by: | peterwilsoncc |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.7 |
| Component: | Site Health | Version: | 5.7 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: | administration |
Description
In changeset [49917] site_url() was used to work with the new REST api tests.
This causes errors in alternative setups like Bedrock where site_url() points to example.com/wp/ which causes an error on the front-end of the website.
Changing site_url() to home_url() fixes this issue.
Attachments (1)
Change History (10)
#5
@
5 years ago
- Resolution fixed
- Status closed → reopened
Reopening per-discussion in #core-site-health. The intent of using site_url was to more closely mimic how a cron request works. So we need to find a way to keep this close to testing loopback for cron, but not error out on subdirectory installs.
Per discussion with @peterwilsoncc, ( see above ), it looks like the best way to do this would be to make a POST request to site_url( 'wp-cron.php' ). Making this a POST request allows us to quickly exit out of Cron without triggering any cron jobs which might error out since cron would have just been executed when Site Health itself is loaded.
This ticket was mentioned in PR #1016 on WordPress/wordpress-develop by peterwilsoncc.
5 years ago
#6
This ticket was mentioned in Slack in #core-site-health by peterwilsoncc. View the logs.
5 years ago
hellofromtonya commented on PR #1016:
5 years ago
#9
Merged with changeset https://core.trac.wordpress.org/changeset/50399
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks @Levdbas, I've uploaded 52547.diff which makes the change you suggested.
Manually tested on a sub-directory install locally and all seems good.