Updating to version 7.x-1.6 AND 7.x-1.7 leads to the following PHP messages after PDF output:

Notice: Undefined index: custom_layout in PdfTemplate->renderRow() (multiple times)
and
Notice: Undefined index: custom_post in PdfTemplate->renderRow() (multiple times)

This only happens if format is set to "table". no problems with format "unformatted".

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

spiikr created an issue. See original summary.

finallylea’s picture

Issue summary: View changes
vegansupreme’s picture

I think I know what's going on here. Looks like I need to add a custom layout hook checkbox to the table layout.
@spiikr, Thanks for specifying that this only happens to table formatted views. That should make this issue easier to fix.

peterbkk’s picture

Can you please provide a patch for this?

Thanks

darbogast’s picture

Also looking for a patch to fix this. Thanks!

robertoperuzzo’s picture

Assigned: finallylea » robertoperuzzo
robertoperuzzo’s picture

Hi there,
I added a simple isset() to check if $options['render']['custom_layout'] array's item is setted.

Debugging I found the same warning for another index
Notice: Undefined index: custom_post in PdfTemplate->renderRow() (linea 571 di .../modules/contrib/views_pdf/views_pdf_template.php).

Fixed this one too.

robertoperuzzo’s picture

Assigned: robertoperuzzo » Unassigned
Status: Active » Needs review
finallylea’s picture

@robertoperuzzo thank you for the patch! It works like a charm.

NWOM’s picture

Version: 7.x-1.7 » 7.x-1.x-dev
Status: Needs review » Reviewed & tested by the community

#7 applies cleanly to the newest dev. Thank you very much for the patch!

killua99’s picture

On my todo list

alansaviolobo’s picture

+1 for the patch

vegansupreme’s picture

Status: Reviewed & tested by the community » Fixed

Committed to dev.

Status: Fixed » Closed (fixed)

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