#21745 closed defect (bug) (fixed)
Database Upgrade Redirect Loop
Reported by: | mdawaffe | Owned by: | |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | major | Version: | |
Component: | Upgrade/Install | Keywords: | has-patch close |
Focuses: | Cc: |
Description
Whenever I do a Database upgrade (non-Multisite), I get stuck in a loop:
- See "Database Upgrade Required"
- Click "Update WordPress Database"
- See "Update Complete"
- Click "Continue"
This is not being caused by object cache.
Chrome is aggressively cacheing both the 302 redirect from whatever admin page is first requested and the responses from wp-admin/upgrade.php:
Request URL: http://hacek.local/wordpress/wp-admin/options-privacy.php Request Method: GET Status Code: 302 Found Request URL: http://hacek.local/wordpress/wp-admin/upgrade.php?_wp_http_referer=%2Fwordpress%2Fwp-admin%2Foptions-privacy.php Request Method: GET Status Code: 200 OK Request URL: http://hacek.local/wordpress/wp-admin/upgrade.php?step=1&backto=%2Fwordpress%2Fwp-admin%2Foptions-privacy.php Request Method: GET Status Code: 200 OK Request URL: http://hacek.local/wordpress/wp-admin/options-privacy.php Request Method: GET Status Code: 302 Found (from cache) Request URL: http://hacek.local/wordpress/wp-admin/upgrade.php?_wp_http_referer=%2Fwordpress%2Fwp-admin%2Foptions-privacy.php Request Method: GET Status Code: 200 OK (from cache) Request URL: http://hacek.local/wordpress/wp-admin/upgrade.php?step=1&backto=%2Fwordpress%2Fwp-admin%2Foptions-privacy.php Request Method: GET Status Code: 200 OK (from cache) ...
Note the "(from cache)" in each of the requests after the initial ones.
Attached adds nocache_headers()
to wp-admin/admin.php before the redirect and to wp-admin/upgrade.php. That's the minimal change that works for me.
It's possible we should instead add a nocache_headers()
to the top of wp-admin/admin.php (in addition to the patched change to wp-admin/upgrade.php), but I haven't thought through what all else that might affect (there is already a nocache_headers()
call at the bottom of that file).
Chrome 23.0.1246.0 dev/OS X
Attachments (1)
Change History (6)
#1
@
12 years ago
- Milestone changed from Awaiting Review to 3.5
- Severity changed from normal to major
#3
@
12 years ago
- Keywords close added
Pretty sure calling nocache_headers() first thing in the admin should be fine. If so, [21913] fixes the ticket.
#4
@
12 years ago
- Resolution set to fixed
- Status changed from new to closed
I'm calling this fixed by [21913], If that doesn't fix it, nothing will.
I've also done quite a few DB upgrade loops today and It hasn't got stuck in a loop once (I used to trigger it once in a while)
Re-open if there's still reports of it.
We call nocache_headers() after auth_redirect(). Would have to think about whether it can/should be placed above that. The only code before auth_redirect() in admin.php is the
rewrite rulesDB upgrade routine, so 21745.diff seems like it would fix all issues in the admin.