The last submitted patch, 11: 2996197-absolute-path-css-11.patch, failed testing. View results →
- Status changed to Needs work
over 1 year ago 5:17am 30 March 2023 - 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
-
+++ b/src/Asset/AssetRenderer.php @@ -41,17 +49,20 @@ class AssetRenderer implements AssetRendererInterface { + public function __construct(AssetResolverInterface $asset_resolver, AssetCollectionRendererInterface $css_renderer, AssetCollectorInterface $asset_collector, FileSystem $file_system) {
let's default this to null and trigger a deprecation if its not set
see https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/lib/Drupal/... for an example
we also need a change notice (link to add one is above) so we can link to it from the deprecation error
-
+++ b/src/Asset/AssetRenderer.php @@ -73,6 +84,15 @@ class AssetRenderer implements AssetRendererInterface { + $asset['type'] = 'external'; + + // The file should be used at filesystem level, so add 'file://'. + $asset['data'] = 'file://' . $this->fileSystem->realpath($asset['data']);
As per review above from benjy, these might not be a file, could be inline css
- We need a post update hook to set the default value in the config
-
- 🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI
Patch #11 also needs some work to be compatible with S3 File System → . I'm getting this error
Drupal\entity_print\Asset\AssetRenderer::__construct(): Argument #4 ($file_system) must be of type Drupal\Core\File\FileSystem, Drupal\s3fs\S3fsFileService given, called in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259
- 🇦🇹Austria nimoatwoodway Tyrol / Austria
After upgrading Drupal from 8 to 10 and upgrading this module, CSS was broken. I use now this patch instead of this here: https://www.drupal.org/project/entity_print/issues/2971822#comment-13884693 🐛 Allow users to choose whether to optimize css. RTBC which fixes the problem for me using wkhtmltopdf.