PdfFormat setConfigurationNoSave, call to undefined method

Created on 13 June 2024, 5 months ago
Updated 21 July 2024, 4 months ago

Problem/Motivation

Allow pdfs to be generated programmatically using the 4 available library plugins. At the moment the setConfigurationNoSave() method makes a call to a method that does not exists on the pdf generator plugins in pdf_api. setConfiguration() only exists on the puphpeteer pdf generator.

Steps to reproduce

Write a method that makes a call to the getOutput() method using pdf as the printable format. It should return the error

Error: Call to undefined method Drupal\pdf_api\Plugin\PdfGenerator\MpdfGenerator::setConfiguration() in /var/www/html/docroot/modules/contrib/printable/modules/printable_pdf/src/Plugin/PrintableFormat/PdfFormat.php on line 204 #0 /var/www/html/docroot/modules/contrib/printable/src/Controller/PrintableController.php(93): Drupal\printable_pdf\Plugin\PrintableFormat\PdfFormat->setConfigurationNoSave(Array)
#1 /var/www/html/docroot/modules/contrib/printable/src/Controller/PrintableController.php(121): Drupal\printable\Controller\PrintableController->prepareFormat(Object(Drupal\node\Entity\Node), 'pdf', Array)
#2 

Proposed resolution

setConfiguration() should only be run if the method is available in the corresponding plugin

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

3.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States kbentham

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024