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.
Problem/Motivation
Error message popping up when reaching a non-existing node:
Notice : Undefined index: content in print_ui_block_view() (line 95 in /sites/all/modules/print/print_ui/print_ui.module).
Can be reproduced by accessing /node/[non-existing-nid] with print_ui enabled.
Proposed resolution
Check that there is a node (and therefore a 'content' block) before altering the 'content' block.
Remaining tasks
Not to my knowledge (but I'm not a Drupal developer, so feel free to tell me!), apart from reviewing the attached patch of course!
User interface changes
No.
API changes
No.
Comment | File | Size | Author |
---|---|---|---|
#1 | print_ui-non_existing_node-1642416-1.patch | 784 bytes | tricasse |
Comments
Comment #1
tricasse CreditAttribution: tricasse commentedComment #2
jcnventura CreditAttribution: jcnventura commentedhttp://drupalcode.org/project/print.git/commit/5855657
Thanks for reporting this.