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.
The renderer '#type' => 'link' does not render links to the public:// files.
Exception Uncaught e UnroutedUrlAssemb 75 Drupal\Core\Utility\UnroutedUrlAsse
InvalidArgumentException: The URI "public://file.yml" is invalid.
You must use a valid URI scheme. Use base:// for a path, e.g., to a Drupal
file that needs the base path. Do not use this for internal paths controlled
by Drupal. in Drupal\Core\Utility\UnroutedUrlAssembler->assemble() (line
75 of
/var/www/d8/drupal/core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php).
Drupal\Core\Utility\UnroutedUrlAssembler->assemble('public://file.yml',
Array)
Drupal\Core\Url->toString()
Drupal\Core\Utility\LinkGenerator->generate('bar', Object)
Drupal::l('bar', Object)
Drupal\Core\Render\Element\Link::preRenderLink(Array)
call_user_func(Array, Array)
Drupal\Core\Render\Renderer->doRender(Array, )
Drupal\Core\Render\Renderer->render(Array, )
drupal_render(Array)
Drupal\system\Tests\Common\UrlTest->testA()
Drupal\simpletest\TestBase->run(Array)
simpletest_script_run_one_test('9', 'Drupal\system\Tests\Common\UrlTest')
Comment | File | Size | Author |
---|---|---|---|
#13 | 2410681-link_public_url-9.patch | 1.82 KB | victor-shelepen |
#9 | 2410681-link_public_url-8.patch | 976 bytes | victor-shelepen |
#7 | 2410681-link_public_url-7.patch | 1.82 KB | victor-shelepen |
#1 | 2410681-link_public_url-1.patch | 976 bytes | victor-shelepen |
Comments
Comment #1
victor-shelepen CreditAttribution: victor-shelepen commentedThis case breaks the system.
Comment #2
victor-shelepen CreditAttribution: victor-shelepen commentedIt fixes the bug case.
Comment #3
mikran CreditAttribution: mikran commentedfixing project, component is just a guess based on patch file name
Comment #4
victor-shelepen CreditAttribution: victor-shelepen commentedComment #5
victor-shelepen CreditAttribution: victor-shelepen commentedComment #6
victor-shelepen CreditAttribution: victor-shelepen commentedComment #7
victor-shelepen CreditAttribution: victor-shelepen commentedIt fixes the bug case.
Comment #8
victor-shelepen CreditAttribution: victor-shelepen commentedComment #9
victor-shelepen CreditAttribution: victor-shelepen commentedThis path fails tests. To apply a patch to fix the issue use https://www.drupal.org/node/2410681#comment-9536147 .
Comment #13
victor-shelepen CreditAttribution: victor-shelepen commentedFixed.
Comment #14
Wim LeersI don't think
'#type' => 'link'
was ever designed to link to file URLs. I'm not sure we want that architecturally speaking, but I can see why you'd want to see that be supported.What about
s3://
orcustom://
?Comment #15
mgiffordNo longer applies.
Comment #16
Wim Leers