Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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".
Comment | File | Size | Author |
---|---|---|---|
#7 | undefined_index_custom_layout-2845910-1.patch | 904 bytes | robertoperuzzo |
Comments
Comment #2
finallylea CreditAttribution: finallylea commentedComment #3
vegansupreme CreditAttribution: vegansupreme commentedI 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.
Comment #4
peterbkk CreditAttribution: peterbkk commentedCan you please provide a patch for this?
Thanks
Comment #5
darbogast CreditAttribution: darbogast commentedAlso looking for a patch to fix this. Thanks!
Comment #6
robertoperuzzoComment #7
robertoperuzzoHi 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.
Comment #8
robertoperuzzoComment #9
finallylea CreditAttribution: finallylea commented@robertoperuzzo thank you for the patch! It works like a charm.
Comment #10
NWOM CreditAttribution: NWOM commented#7 applies cleanly to the newest dev. Thank you very much for the patch!
Comment #11
killua99 CreditAttribution: killua99 commentedOn my todo list
Comment #12
alansaviolobo CreditAttribution: alansaviolobo as a volunteer commented+1 for the patch
Comment #14
vegansupreme CreditAttribution: vegansupreme commentedCommitted to dev.