Automattic / Automattic/wp-super-cache
Super Cache: incompatibility with Core's theme file editor
- Dominant language
- PHP
- Stars
- 436
- Forks
- 130
- Avg merge
- 15h 11m
- Merged PRs (30d)
- 10
Description
### Impacted plugin
Super Cache
### What
Caching set to "all visitors" should not break WP's Theme File Editor loopback test
### How
If “Enable caching for all visitors” is selected in Super Cache, PHP files for the currently active theme cannot be edited via the native Wordpress Theme File Editor. This is because the loopback test which confirms the change does not result in a PHP error cannot confirm all is ok, so the change gets reverted. The error “Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.” is shown on screen.
If Super Cache is set to "Disable caching for logged in visitors" then the loopback test is successful and the change to PHP files can be made.
Ideally the loopback test should always be excluded from receiving the cached version, perhaps by user agent or another method you feel is more appropriate
Also see https://wordpress.org/support/topic/breaking-the-wp-theme-file-editor-loopback-test/.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failure through WordPress's native Theme File Editor with Super Cache set to “Enable caching for all visitors,” then compare it with “Disable caching for logged in visitors.” Trace the loopback test behavior and the linked support report. Done means the loopback test succeeds and active-theme PHP changes are not reverted while caching remains enabled for visitors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100