Notice: Undefined index: p_body in _webform2pdf_get_template() (line 170 of webform2pdf/webform2pdf.module).

Comments

Bogomazik’s picture

StatusFileSize
new542 bytes
pbosmans’s picture

With this patch you skips the check-markup function (line 170 within the webform2pdf.module).
Can it be an issue ?
Wouldn't be better to check if the $settings variable is empty before line 170 ?

mrpauldriver’s picture

Is there a consensus regarding the best approach with this bug?

nico.knaepen’s picture

Status: Patch (to be ported) » Needs work

This issue only occured when on the mail setting no "Included e-mail settings" was checked.
By checking at least one item the problem got solved.
This seems more like a validation issue then a fix as worked out in the current patch.

nico.knaepen’s picture

Status: Needs work » Needs review
StatusFileSize
new872 bytes

Isn't the approach to check if p_body exists better?

mrpauldriver’s picture

Status: Needs review » Reviewed & tested by the community

Patch at #5 works for me

br0ken’s picture

StatusFileSize
new663 bytes

Patch has been created from wrong place. Add a correct one.

  • BR0kEN committed 20457f0 on 7.x-4.x
    Issue #2479293 by Bogomazik, nico.knaepen, BR0kEN: Notice when PDF...
br0ken’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

pharamis’s picture

Unfortunately, I'm still getting the notice after the patch was applied. I think it's pretty odd, because the option "Generate PDF Document" is unchecked and the module still refers to a template.

druliner’s picture

I was able to suppress this warning by enabling PDF generation on the webform in question, saving the configuration, and then disabling PDF generation again. Leads me to believe that it's trying to access template variables even when PDF generation is disabled.