- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
file_url_transform_relative()
was deprecated in 9.3.0 and was converted to\Drupal\Core\File\FileUrlGeneratorInterface::transformRelative()
. At the very least this needs an IS update. Can we check if this is still an issue in the new code? - πΊπΈUnited States mradcliffe USA
I was following the issue. The code has changed a little bit, but not substantially that would solve the root cause in the public method.
I went through some of the use cases and issues.
- #2257291: Handle alternate domains in filter_html_image_secure β - still applies
- #2825593: Allow relative urls for favicons in config β - as an example of a contrib theme/module storing a URL into config, but I don't think this applies as I don't think that theme should have been storing a module/theme provided file in config.
- ImageUrlFormatter / ImageStyleInterface::buildUrl - does not apply as that uses stream wrappers.
- ::transformRelative is a public method so it would be possible for custom and contrib code to pass in an absolute URL similar to what is in core filter module.So if we added a mismatch of URL and host to
UrlTransformRelativeTest::providerFileUrlTransformRelative
, then we would
probably get failures.For a functional test, I'm not sure if we could modify
FilterHtmlImageSecureTest::testImageSource
since we probably would want to mock the the request host so maybe a separate functional test in that file?There is now a workaround however - override the file_url_generator service, but I don't think we want to recommend that.
I'm leaving the issue tags and status as-is.