Problem/Motivation
An installation of Drupal has been placed in a subdirectory (/drupal) of webroot. The .htaccess file contains the RewriteBase directive to point to the subdirectory.
RewriteBase /drupal
The base_url variable in the settings.php file has been set to the base url of the site excluding the subdirectory (http://example.com).
On running update.php on the base URL (http://example.com) when updating Drupal version 7.8 to 7.12, the URL continue button link is pointing to the base URL plus the subdirectory (http://example.com/drupal/update.php) as opposed to just the base URL (http://example.com/update.php).
The issue appears to be limited to sites using the RewriteBase directive and using the update.php file from a previous release of Drupal (7.8) is working correctly.
Here as an additional info for installing Drupal withing subdirectory:
http://www.trevorsimonton.com/blog/drupal-sudirectory-install-htaccess-s...
Proposed resolution
An untested patch has been provided to fix the issue, that gets the URL path using parse_url rather than using the SCRIPT_NAME server variable
Remaining tasks
The patch needs testing.
User interface changes
None
API changes
None
Original report by [goood]
I have problem with new version of update.php script
I updated from D7.8 to D7.12. Drupal is located in folder /drupal of webroot and web has url in format http://www.example.com (not http://www.example.com/drupal)
In .htaccess I have
RewriteBase /drupal
In settings.php I have
$base_url = 'http://www.example.com';
Web works fine, but update.php generates wrong url for continue button. There is http://www.example.com/drupal/update.php instead of http://www.example.com/update.php !
Finally I used update.php from previous version (D7.8) and it works fine, because there is another way of generating url
Beta phase evaluation
Issue category | Bug since the behavior of update.php is not as expected |
---|---|
Issue priority | Major because Drupal install in subfolder is quite a common case. |
Unfrozen changes | Unfrozen because it's a bug fix |