Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Referring to the todos from drupal_settings_initialize() in #1183208-86: Remove variable_get('clean_url') and switch to index.php/path pattern for dirty URL support
Core scripts (e.g., 'core/install.php', 'core/update.php', etc.) currently expect url() to link to Drupal's primary front controller (index.php), rather than back to themselves.
- Do we want to refactor them to not expect this?
- Do we want to limit to core scripts only, allowing modules to add custom front controllers and having url() be relative to them?
Comments
Comment #1
cweagansWe should ask Crell about this, because I suspect that there's going to be a really nice, clean way of doing things with Symfony. Also, you might check into the installer rewrite - that will significantly change how this is handled.
Comment #2
Crell CreditAttribution: Crell commentedOnce we switch to the Symfony Generator, we should be getting back a URL that includes (or not) the base script that was used to get to the page. I think. :-) I need to check into that again. That is, the current trajectory would have index.php point to index.php, install.php point to install.php, etc.
Comment #3
David_Rothstein CreditAttribution: David_Rothstein commentedFor what it's worth, parts of update.php apparently believe this is the way the code works already:
I think the code comment is wrong though :)
Also, these scripts (install.php and update.php) already mostly use a special helper function to link back to themselves anyway, drupal_current_script_url(), since it's important that they maintain any query parameters which are set throughout the duration of the script, and that function helps them do that. So I'm guessing they wouldn't ever want to call url() directly to link to themselves (even if it worked), but rather at most have the internal behavior of that helper function call it... which would not be a bad thing since that function is a little broken anyway, #1433996: update.php doesn't work when Drupal is installed in a subfolder and RewriteBase is used.
Comment #4
pplantinga CreditAttribution: pplantinga commentedAs is evidenced by the discussion on #2017769: Links from update_helpful_links() should point to site root and not to update.php url now points to the currently executing script.
Comment #4.0
pplantinga CreditAttribution: pplantinga commentedUpdated issue summary.