- last update
almost 2 years ago Patch Failed to Apply
In Url::toString()
the UnroutedUrlAssembler::buildLocalUrl()
method adds a the subdirectory to Drupal paths. The Url::fromUserInput()
method only accepts URLs relative to the root directory though. This could lead to situations (for example action URLs in forms) where Drupal has a URL containing a subdirectory, but is unable to process them via Url::fromUserInput()
because the URL is not a relative path. It would be nice to have a helper method to strip subdirectories from a path so you are able to feed the path to Url::fromUserInput()
.
See related issues:
#2990664: Media library does not work when Drupal is installed into a sub-directory β
#3002805: Media Widget Cannot Select Media - Page not Found/ReWrite Base Conflict β
#3042038: Allow UrlGenerator to process action URLs in FormBuilder::buildFormAction() β
π
\Drupal\Core\Url does not accept root-relative (file) URLs, making it impossible to let LinkGenerator create root-relative file URL links
Active
Add a helper method to strip subdirectories from a path.
Write patch
Review
Commit
None.
New helper method to strip subdirectories from a path.
None.
Needs work
10.1 β¨
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.