Problem/Motivation
The base: scheme is specifically intended for internal, base-relative, non-routed URLs used in code, e.g. base:robots.txt. There are 70-80 non-documentation uses in core. In some of these cases, it's unclear why base: is used (vs. a route, entity:, user-path:, etc.)
Proposed resolution
Review all the uses. In each case, evaluate whether it actually must be base:, and if so, document why.
Beta phase evaluation
| Unfrozen changes | Unfrozen because only documentation should be changed in this issue. (Individual child issues may be bugs, etc.) |
|---|
Remaining tasks
For each use:
- Review it and determine if a route, entity URI, or user-entered URI is appropriate instead, or if there's a different usecase.
- If it should indeed be
base:, document why. - If it should be something, else, file a separate issue to fix it.
User interface changes
None.
API changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | base-082a601.txt | 12.19 KB | mpdonadio |
Comments
Comment #1
xjmComment #2
xjmComment #3
xjmComment #4
xjmComment #5
xjmHere are the instances of the string in PHP files in core:
Comment #6
pwolanin commentedSearching with ack, I find these non-comment uses:
Comment #7
pwolanin commentedLocalTasksTest usage is not needed for sure.
#2419015: Remove use of base: scheme in LocalTasksTest
Comment #8
effulgentsia commentedAdded child #2423951: Document each use of base: in rest.module
Comment #9
mpdonadiocore/authorize.php is unrouted, so `Url::fromUri('base:core/authorize.php')` is appropriate: #2423953: Properly comment use of Url::fromUri('base:core/authorize.php')
Comment #10
joelpittet@mpdonadio et al: We were digging into the uninstaller issues and authorize.php and we noticed since around the Feb 8th 2015 the redirect path has busted for that Url generation.
@SebCorbin noticed it here:
#2042447-82: Install a module user interface does not install modules (or themes)
It's reproducible with the following circumstances:
Use a path prefix install or a language prefix and run this in drush:
Without the path prefix/language prefix you will get what you expect:
/core/authorize.php@SebCorbin was getting this with or without path prefixing:
/index.php/core/authorize.phpWhich seems to think that it's a path and not a file.
And as you can see in the issue above we were getting the following after the batch redirect:
@SebCorbin:
http://localhost:8080/d8-sandbox/core/authorize.php/en/%3Cnone%3E@joelpittet:
http://d8.dev/core/authorize.php/%3Cnone%3EBoth are incorrect so I thought I'd ask here before opening a new issue as I know you all are working hard on straightening this out.
Comment #11
mpdonadiocore/install.php is an unrouted URL, but its use throughout core is inconsistent: #2429885: Inconsistent usage of core/install.php
Also attaching uses of base: as of `git rev-parse --short HEAD == '082a601'`
Comment #12
wim leersIdeally, we would still do this.
Comment #13
joelpittetComment #29
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #30
smustgrave commentedProbably still valid.