Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem:
Notice: Undefined index: aslist in webform_select_options_ajax() (line 792 of webform/components/select.inc).
Reproduce:
- Create a new or edit an existing Select options component.
- Select a(nother) option in Load a pre-built option list
- You don't see any error, because Drupal doesn't show errors in Ajax responses well. But it's there. See watchdog.
Cause:
<?php
// $component doesn't exist here yet
$component['extra']['options_source'] = $source_name;
$options = _webform_select_options_to_text(_webform_select_options($component, !$component['extra']['aslist'], FALSE));
?>
So !$component['extra']['aslist']
is always TRUE.
Comment | File | Size | Author |
---|---|---|---|
#2 | webform-2369049-2.patch | 594 bytes | rudiedirkx |
Comments
Comment #1
rudiedirkx CreditAttribution: rudiedirkx commentedComment #2
rudiedirkx CreditAttribution: rudiedirkx commentedVery simple patch. One less notice.
Comment #3
rudiedirkx CreditAttribution: rudiedirkx commentedComment #5
DanChadwick CreditAttribution: DanChadwick commentedNot sure what version you are using, but it isn't the latest 7.x-4.x-dev. Here is the code from there:
Since this code doesn't reference 'aslist', I'm closing this an, I dunno, CNR(?). Please re-open if I am in error.
Comment #6
rudiedirkx CreditAttribution: rudiedirkx commentedYeah, it was 3.x which I had checked out for some reason... My bad. =) There's no Issue Status to describe this fail =)
Comment #7
rudiedirkx CreditAttribution: rudiedirkx commentedSo I guess it's a Won't Fix for 3.x.