When using the default rule to send a webform as a PDF via rules I get these errors:
Warning: Missing argument 10 for fillpdf_merge_pdf(), called in /home8/northwy6/public_html/sites/all/modules/fillpdf/fillpdf.rules.inc on line 191 and defined in fillpdf_merge_pdf() (line 293 of /home8/northwy6/public_html/sites/all/modules/fillpdf/fillpdf.module).
Notice: Undefined variable: uc_order_product_ids in fillpdf_merge_pdf() (line 375 of /home8/northwy6/public_html/sites/all/modules/fillpdf/fillpdf.module).
Notice: Undefined index: webform in webform_rules_tokens() (line 213 of /home8/northwy6/public_html/sites/all/modules/webform_rules/webform_rules.module).
Warning: array_keys() expects parameter 1 to be array, null given in webform_rules_tokens() (line 213 of /home8/northwy6/public_html/sites/all/modules/webform_rules/webform_rules.module).
Notice: Undefined index: webform in webform_rules_tokens() (line 219 of /home8/northwy6/public_html/sites/all/modules/webform_rules/webform_rules.module).

The email sends, and there is an attachment, but the attachment is blank, and will not open.

Perhaps I have missed something in setting this up?

Comments

butteryak’s picture

Category: Bug report » Support request
butteryak’s picture

Used an incorrect token in field mappings, changing it resolved some of my errors, but I still get these two, and the PDF that is attached can not be opened and is empty.

Warning: Missing argument 10 for fillpdf_merge_pdf(), called in /home8/northwy6/public_html/sites/all/modules/fillpdf/fillpdf.rules.inc on line 191 and defined in fillpdf_merge_pdf() (line 293 of /home8/northwy6/public_html/sites/all/modules/fillpdf/fillpdf.module).
Notice: Undefined variable: uc_order_product_ids in fillpdf_merge_pdf() (line 375 of /home8/northwy6/public_html/sites/all/modules/fillpdf/fillpdf.module).

butteryak’s picture

Changed this code in fillpdf.module, not sure if it's correct or not, but it takes care of my error:

Line 293

function fillpdf_merge_pdf($fid, $nids = NULL, $webform_arr = NULL, $sample = NULL, $force_download = FALSE, $skip_access_check = FALSE, $flatten = TRUE, $handle = TRUE, $uc_order_ids = NULL, $uc_order_product_ids)

changed to:

function fillpdf_merge_pdf($fid, $nids = NULL, $webform_arr = NULL, $sample = NULL, $force_download = FALSE, $skip_access_check = FALSE, $flatten = TRUE, $handle = TRUE, $uc_order_ids = NULL, $uc_order_product_ids = NULL)

butteryak’s picture

Blank PDF was due to corrupt source PDF, replacing it with a good PDF takes care of that problem. Everything works as expected now.

liam morland’s picture

Status: Active » Fixed

If you need more help, please re-open, provide details, and move this issue a supported branch: 7.x-1.x or 8.x-4.x

Status: Fixed » Closed (fixed)

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