- last update
over 1 year ago Patch Failed to Apply - Status changed to Needs work
over 1 year ago 3:57pm 24 July 2023 - πΊπΈUnited States smustgrave
IS needs updating.
testDeprecatedFileCreateUrl has been removed so will need a new test.
I am upgrading to 9.3.16. The backwards compatibility layer for file_uri() addressed in https://www.drupal.org/project/drupal/issues/3254245 β applies only for generateAbsoluteString and generateString.. but does not apply for transformRelative... So I am getting following error message after upgrading to 9.3.16..
TypeError: Argument 1 passed to Drupal\Core\File\FileUrlGenerator::transformRelative() must be of the type string, null given, called in /var/www/docroot/core/includes/file.inc on line 105 in Drupal\Core\File\FileUrlGenerator->transformRelative() (line 208 of core/lib/Drupal/Core/File/FileUrlGenerator.php)
After I patched locally with below fix, its working !
function file_url_transform_relative($file_url) {
@trigger_error('file_url_transform_relative() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\File\FileUrlGenerator::transformRelative() instead. See
https://www.drupal.org/node/2940031 β
', E_USER_DEPRECATED);
++ if (is_null($file_url)) {
++ return NULL;
++ }
return \Drupal::service('file_url_generator')->transformRelative($file_url);
}
Needs work
11.0 π₯
Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
IS needs updating.
testDeprecatedFileCreateUrl has been removed so will need a new test.