In the _print_pdf_wkhtmltopdf function (print_pdf.pages.inc), when an error occurs and a PDF isn't produced the user should go to $print['url'], rather than the non-existent $meta['url'].

Patch to be attached in the next comment.

Comments

siliconmeadow’s picture

StatusFileSize
new439 bytes

Patch as mentioned.

siliconmeadow’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

Whoops. I'm such a D7 n00b!

mwesthof’s picture

I was thinking the same.
The code change works for me.

The bug causes:

Notice: Undefined variable: meta in _print_pdf_wkhtmltopdf() line 434 of ... /sites/all/modules/contrib/print/print_pdf/print_pdf.pages.inc).

and then redirects to the home page.

The code change changes the behaviour of the goto to stay on the current page.

simon georges’s picture

Status: Needs review » Reviewed & tested by the community
jcnventura’s picture

Status: Reviewed & tested by the community » Fixed
mwesthof’s picture

Thanks for the patch and thanks for the commit! Pretty smooth bug squash. Awesome!

Status: Fixed » Closed (fixed)

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