Problem/Motivation

When printing multiple documents (say commerce invoices, bulked at given time) with a background worker, a queue comes in handy. Generally when using entity_print from CLI context the resulting document should be the same as when printed through a web-call. This currently is not the case as symfony will provide "http://default" as the base request URL. As such printing engines will not include document relative styles.

Although an effort has already been made (sort of) for phpwkhtmltopdf to have absolute urls, sources and links, the fix isn't currently doing anything for prints in php CLI.

Steps to reproduce

Use drush or a queue worker initialized by cron to print an entity and observe the missing styles.

Proposed resolution

Commit my MR.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

attisan created an issue. See original summary.

attisan’s picture

Status: Active » Needs review
attisan’s picture

Assigned: attisan » Unassigned

  • attisan committed 7d57565 on 8.x-2.x
    Issue #3279185 by attisan: Fix printing in php CLI context (like drush)
    
attisan’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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