When transitioning from an older mpdf tool to a newer one there can be a (short) moment where the old tool is gone, but still configured in the print_pdf_mpdf settings.

However currently when such a scenario happens, the entire site breaks to the point where you need to edit the database manually to remove the configured pdf tool.
Since in the print_pdf_mpdf_pdf_tool_version function a require_once is done on the configured pdf tool.
This function is called at a point where it can't be avoided and is executed at everything you try to do with drupal.

A missing pdf tool should not cause a full site break down but should be handled nicely and present an error at a suitable point.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

paulvandenburg created an issue. See original summary.

paulvandenburg’s picture

Status: Active » Needs review
FileSize
1.55 KB

This adds clean handling of a missing PDF tool.

TVoesenek’s picture

Status: Needs review » Reviewed & tested by the community

Patch tested, works as described.

jcnventura’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the patch.. This would happen with all other PHP libraries, so I had to do a few more fixes.

  • jcnventura committed 7b8b691 on 7.x-2.x
    Issue #2992512 by paulvandenburg, Tom Voesenek, jcnventura: Don't break...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.