- Merge request !16Issue #2860122: How to set theme used for entity_print rendering? → (Open) created by alexandersluiter
- First commit to issue fork.
- 🇺🇸United States sassafrass
I was unable to apply the latest patch using:
Drupal core 9.4.10
Entity Print 8.x-2.11 - 🇺🇸United States caesius
Regarding the previous comment, we were using both this patch and the one in 2996197: Use absolute paths in css ✨ Use absolute paths in css Needs work which resulted in a patching conflict.
Attached is a patch which combines both.
- Status changed to Needs work
over 1 year ago 5:07am 30 March 2023 - 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
This is looking great, we just need a BC layer for the service constructor changes in case someone has sub-classed the services.
So default the new arguments to null, if they're not set, use trigger_error to trigger a deprecation and set it using \Drupal.
Here's an example from core - https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/lib/Drupal/...
We also need a change notice so we have something to link to, there's a link at the top of this page to 'add change notice'
Thanks again, nice work adding an upgrade path 🤌
- 🇨🇦Canada spiderman Halifax, NS
FYI, we've been using the patch/MR here along with the one in ✨ Support multiple view modes for a given library Needs review , and found managing the two patches at once to be cumbersome. As such, I've created a custom fork that incorporates both, here: https://gitlab.com/consensus.enterprises/drupal/entity_print/-/commits/d...
I am guessing this would require other modules to update dependency injection. Seeing this trying to use this patch on commerce orders:
ArgumentCountError: Too few arguments to function Drupal\entity_print\Renderer\ContentEntityRenderer::__construct(), 5 passed in /var/www/html/web/modules/contrib/commerce/modules/order/src/EntityPrint/OrderRenderer.php on line 50 and exactly 7 expected in Drupal\entity_print\Renderer\ContentEntityRenderer->__construct() (line 60 of /var/www/html/web/modules/contrib/entity_print/src/Renderer/ContentEntityRenderer.php).
- 🇦🇹Austria mvonfrie
MR 16 conflicts with #2971822 🐛 Allow users to choose whether to optimize css. RTBC .
- 🇦🇹Austria mvonfrie
About #39 the error message in commerce order there is already an issue ( Commerce #3336653 💬 Support setting theme for entity print patch Needs review ), added it as child issue.
- 🇨🇦Canada gwvoigt London, ON 🇨🇦
Same as @spiderman, I'm using patch #44 from https://www.drupal.org/project/entity_print/issues/2884806 ✨ Support multiple view modes for a given library Needs review (Support multiple view modes for a given library) and this patch conflicts with it. I tried adapting the patch locally to work with the patch from this current issue but no luck. Also tried @spiderman's fork (Merge branch '2884806-support-multiple-view-modes' into develop commit) but no luck either. I'm on:
Drupal 10.1.4
entity print 8.x-2.13
using the patches:
https://www.drupal.org/files/issues/2023-01-21/support-multiple-view-mod... →
https://www.drupal.org/files/issues/2023-07-10/entity_print-dompdf_page_... → - 🇨🇦Canada gwvoigt London, ON 🇨🇦
I could fix it in a hook_preprocess_entity_print:
$css = '
';
$variables['entity_print_css'] = Markup::create($css);It's not ideal but it works, none of the patches provided worked for me unfortunatelly.
- First commit to issue fork.
- last update
10 months ago 52 pass, 2 fail - 🇺🇸United States SocialNicheGuru
I upgraded to Drupal 10.3 and php8.2
I ran system updates for views.I got the following error because of this patch
ArgumentCountError: Too few arguments to function [error]
Drupal\entity_print\PrintBuilder::__construct(), 3 passed in
drupal-10.3.x/html/core/lib/Drupal/Component/DependencyInjection/Container.php
on line 261 and exactly 4 expected in Drupal\entity_print\PrintBuilder->__construct() (line 56
of
drupal-10.3.x/html/modules/contrib/entity_print/src/PrintBuilder.php) - First commit to issue fork.
- Status changed to Needs review
3 months ago 5:10pm 14 August 2024 - 🇺🇦Ukraine Taran2L Lviv
Added a draft change record + concrete module version + fixed PHPunit
- 🇮🇹Italy viappidu
Not sure why but I cannot merge your last push. Created a patch
- 🇺🇸United States caesius
The above patch is almost identical to the MR except it removes the newly-added
src/ThemeResolverInterface.php
andsrc/ThemeResolver.php
files.I had no issues applying the MR to either the current
8.x-2.x-dev
or to8.x-2.15
, so I don't see any reason for #50 to have been created. Please be more careful when creating patches.