- Status changed to Needs review
almost 2 years ago 9:56am 19 January 2023 - π§πͺBelgium kwinten-hardies Vlaams-Brabant
I have the same error as #110 π Error generating document: Failed to generate PDF with DOMPDF Needs work With patch from 118 and entity_print 2.11 and dompdf v1.2.2 as v2.0.1. But even with dompdf v2.0.1 it's not working.
- π¨π¦Canada joseph.olstad
v2.0.1 of dompdf is working for us with the latest entity_print release.
This patch is still working for me provided that I put in a base_urlI have some css resources that it otherwise can't load and throws an error if the base_url isn't set thanks to the patch.
This is the patch that we're using. Otherwise http://default/sites/default/files/css/xyz.css never resolves to our css
but when we put http://domain.docker.localhost into the base_url setting provided by this patch number 116, it works."drupal/entity_print": { "2865185 - DomPDF incorrect url internally to docker container, override with setting.": "https://www.drupal.org/files/issues/2023-01-18/entity_print-dompdf_base_url-2865185-116.patch" },
- π¦πΊAustralia sonnykt Melbourne, Australia
@Rar9 @kwinten-hardies you should probably check the output HTML for printing. Do you have HTML5 Parser enabled for Dompdf plugin?
- π©πͺGermany Rar9
Html parser is enabled, and base url is defined to point to our css.
Watch the html for what?
- π¦πΊAustralia sonnykt Melbourne, Australia
@Rar9 probably check for malformed HTML. The error message from dompdf likely relates to the HTML structure instead of remote assets.
- π¦πΊAustralia sonnykt Melbourne, Australia
I notice that Entity Print 8.x-2.11 introduced a new root setting
Base URL
:
It also has the
entity_print.post_render_subscriber
event subscriber to change all root relative URIs in<link href>
,<a href>
, and<img src>
into absolute URLs using the new base URL setting above.I have tried to remove the patch from this issue and instead use that new Base URL setting and notice that dompdf is still able to load CSS/images on my Docker-based project.
I wonder if this issue is still valid with the new setting.
- π©πͺGermany macdev_drupal Wiesbaden
For me, it seems like this new Base_url field in entity_print 2.11 does not work for us.
We have differences between stages, we are coping with like installations which can not curl themselves at all, installations which can curl only via localhost, installations which can resolve their domain names and docker / ddev for development.
And then there is multisite, we have to deal with. Further, we are using it with webform, which has some special issues when private files and the signature field are used.I got it working in ddev / docker, but not at installations which can call themselves only via localhost. It, too, seems that the file:/// syntax is not supported.
If the patch is applied against 2.11 it doesn't work either. I guess the base_url field form module needs to be overridden to bring back the previous behavior.
Meanwhile, I'll roll back to the patched 2.7 and try to figure out if a differently patched 2.11 would be an option. - Status changed to Needs work
over 1 year ago 11:30pm 21 March 2023 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
With this there are now two base url fields, so we need to rework it to use the root base url field
- π¦πΊAustralia gigimaor Narangba/Brisbane
This patch works for me on Drupal 10
- Status changed to Needs review
over 1 year ago 8:22pm 22 June 2023 - last update
over 1 year ago 54 pass - last update
over 1 year ago 54 pass - π¨π·Costa Rica jorgewray93
The issue continue for me, comparing the patch 113 and the patch 129, I see that two lines are not adding in the patch 129.
- last update
over 1 year ago 54 pass - π¦πΊAustralia alex.skrypnyk Melbourne
Re-rolled #132 + fixed coding standards for version 2.13
- First commit to issue fork.
- last update
over 1 year ago 54 pass - last update
over 1 year ago 54 pass - last update
over 1 year ago 54 pass - last update
over 1 year ago 54 pass - π¦πΊAustralia jannakha Brisbane!
ready for review MR https://git.drupalcode.org/project/entity_print/-/merge_requests/19/diffs
patches were not up to date with latest version (and were not tested as base_url was not even passed through)
can we please stick to git-flow with patches?
- last update
over 1 year ago 54 pass - π¦πΊAustralia sonnykt Melbourne, Australia
Re-rolled patch file from #116 and #133 on the latest 8.x-2.13. This new patch now uses the root base_url setting from entity_print.
- last update
about 1 year ago 54 pass - π¨π·Costa Rica jorgewray93
Adding the missing line in the patch #132
- Status changed to RTBC
about 1 year ago 6:07pm 26 October 2023 - π§πͺBelgium BramDriesen Belgium π§πͺ
Re #137 The missing line was missing for a reason, it is not needed π
Re #136 Your patch is omitting a fix from the MR and adding a schema field which is unused in this issue? If it's missing it should be added in it's own issue, not as part of a different issue.Re #134/#135 I reviewed the merge request and to me this seems okay. The Base URL is properly passed now.
Let's stick to the MR now.
- Status changed to Needs work
11 months ago 10:08pm 3 January 2024 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Can we get an issue summary update here and have the redundant MRs and patches hidden.
There are two MRs so I'm not sure which one is RTBC
Additionally the issue summary talks about the issue being something to do with settings.php, let's update it to reflect the new approach.
- π§πͺBelgium BramDriesen Belgium π§πͺ
Let's stick with the latest MR as it's more complete as the other patches.
- π§πͺBelgium BramDriesen Belgium π§πͺ
BramDriesen β changed the visibility of the branch 2865185-error-generating-document to hidden.
- Status changed to Needs review
2 months ago 2:40am 14 September 2024 - π¨π¦Canada joseph.olstad
I have developed a patch for the dompdf library that works around this issue or most Drupal 10+ sites that are using docker setups with reverse proxy issues or other issues with certificates. Total workaround.
Here it is:"dompdf/dompdf": { "2865185 or https://github.com/drupalwxt/docker-scaffold/issues/43": "https://github.com/user-attachments/files/17000656/dompdf_change_local_http_uri_to_a_file.patch.txt" },