Ensure that a new dom crawler is instantiated for each exported PDF

Created on 27 June 2024, 2 months ago
Updated 21 July 2024, about 2 months ago

Problem/Motivation

If you try to export more than one entity as a pdf with once instance of the PrintableFormatPluginManager you get the following error
[error] Attaching DOM nodes from multiple documents in the same crawler is forbidden.

Steps to reproduce

For me this showed up when trying to use a queue worker to export a bunch of nodes at once. Calling $printableController->getOutput() in the process item works for the first process queue item but prodices the above error for all subsequent queue items.

Proposed resolution

Ensure that a new dom crawler is used each time we export an entity as a pdf.

πŸ› 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