[wp-trac] [WordPress Trac] #21745: Database Upgrade Redirect Loop
WordPress Trac
wp-trac at lists.automattic.com
Fri Aug 31 08:13:30 UTC 2012
#21745: Database Upgrade Redirect Loop
-----------------------------+-----------------------------
Reporter: mdawaffe | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version:
Severity: normal | Keywords: has-patch
-----------------------------+-----------------------------
Whenever I do a Database upgrade (non-Multisite), I get stuck in a loop:
1. See "Database Upgrade Required"
2. Click "Update WordPress Database"
3. See "Update Complete"
4. 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
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21745>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list