Printable PDF TypeError EventDispatcher

Created on 1 May 2025, 5 months ago

Having upgraded to Drupal 11, with version 3.1.3 of printable I'm seeing the following error when clicking a pdf link on any node:

TypeError: Drupal\printable_pdf\Plugin\PrintableFormat\PdfFormat::__construct(): Argument #16 ($eventDispatcher) must be of type Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher, Symfony\Component\EventDispatcher\EventDispatcher given, called in /app/web/modules/contrib/printable/modules/printable_pdf/src/Plugin/PrintableFormat/PdfFormat.php on line 165 in Drupal\printable_pdf\Plugin\PrintableFormat\PdfFormat->__construct() (line 90 of /app/web/modules/contrib/printable/modules/printable_pdf/src/Plugin/PrintableFormat/PdfFormat.php).

If I downgrade to 3.1.2 (ignoring the info file compatibility) this error is not present and the pdf generates successfully.

I've tried this with all pdf library options; dompdf, mpdf etc and get the same result.

🐛 Bug report
Status

Active

Version

3.1

Component

Code

Created by

🇬🇧United Kingdom iancawthorne

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024