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.
#1695658: Support optgroups for taxonomy selection list introduced a bug that causes the following PHP Notices and Warnings:
Notice: Undefined variable: options in views_handler_filter_term_node_tid->value_form() (line 237 of /var/www/html/sites/all/modules/git/views/modules/taxonomy/views_handler_filter_term_node_tid.inc).
Notice: Undefined variable: options in views_handler_filter_term_node_tid->value_form() (line 238 of /var/www/html/sites/all/modules/git/views/modules/taxonomy/views_handler_filter_term_node_tid.inc).
Warning: Invalid argument supplied for foreach() in views_handler_filter->prepare_filter_select_options() (line 1208 of /var/www/html/sites/all/modules/git/views/handlers/views_handler_filter.inc).
Warning: Invalid argument supplied for foreach() in form_select_options() (line 2841 of /var/www/html/includes/form.inc).
It appears that a single line was accidentally removed from modules/taxonomy/views_handler_filter_term_node_tid.inc
which initialized the $options
variable.
See my comment here: https://www.drupal.org/project/views/issues/1695658#comment-13170199
Comment | File | Size | Author |
---|---|---|---|
#2 | views-3065777-2.patch | 695 bytes | m.stenta |
|
Comments
Comment #2
m.stentaAttached is a patch that restores the declaration of the
$options
variable.Comment #3
philipsoares CreditAttribution: philipsoares commentedIt's worked fine for me. Thanks.
Comment #4
renatogReally makes sense
#RTBC
Good catch guys. Thank you so much!
Comment #5
DamienMcKennaComment #7
DamienMcKennaCommitted. Thanks.
Comment #8
renatogGreat!
Thank you all, guys!