Required fields on quiz element causing WSOD when visibility is conditional

Created on 3 February 2025, 2 months ago

Problem/Motivation

When a quiz radio field (only tried radio/checkbox) is set to have conditional visibility based on the value of another element, and then the quiz field is set to required it causes a WSOD. This happens whether 'required' is set as a field setting, or as a condition.

Steps to reproduce

  1. Create a webform
  2. Add a normal radio question that the quiz radio will be dependent on with yes/no answers.
  3. Add a quiz radio element, and make the visibility conditional on the previous radio's value being 'yes'
  4. Now set the quiz radio element to be required
  5. View the webform
  6. Click yes to the first radio, so that the quiz radio appears
  7. Select an option for the quiz radio
  8. Submit

This results in the following error:
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "webform_quiz_checkboxes" plugin does not exist. Valid plugin IDs for Drupal\Core\Render\ElementInfoManager are: captcha, contextual_links, contextual_links_placeholder, links_with_other, links, print_link, horizontal_tabs, field_group_html_element, field_ui_table, managed_file, processed_text, text_format, fivestar, key_select, language_configuration, linkit, search_override_element, status_report_page, token_tree_table, toolbar_item, toolbar, question_group_score, webform_eligibility_element, webform_attachment_doc, webform_submission_views, webform_contact, webform_html_editor, webform_actions, webform_email_multiple, webform_computed_twig, webform_tableselect_sort, webform_variant, webform_term_select, webform_flexbox, webform_telephone, webform, webform_codemirror, webform_scale, webform_radios_other, webform_entity_checkboxes, webform_multiple, webform_height, webform_excluded_columns, webform_horizontal_rule, webform_table_row, webform_same, webform_section, webform_options, webform_image_resolution, webform_checkboxes_other, webform_element_options, webform_audio_file, webform_autocomplete, webform_wizard_page, webform_roles, webform_signature, webform_element_attributes, webform_mapping, webform_element_composite, webform_select_other, webform_entity_select, webform_name, webform_document_file, webform_entity_radios, webform_submission_navigation, webform_markup, webform_element_multiple, webform_users, webform_message, webform_likert, webform_excluded_elements, webform_checkbox_value, webform_link, webform_time, webform_rating, webform_table_sort, webform_video_file, webform_table, webform_submission_information, webform_help, webform_custom_composite, webform_term_checkboxes, webform_terms_of_service, webform_image_file, webform_more, webform_element_states, webform_permissions, webform_submission_views_replace, webform_address, webform_email_confirm, webform_computed_token, webform_attachment_token, webform_attachment_url, webform_attachment_twig, webform_element_encrypt, webform_entity_print_attachment, webform_quiz_quiz_result_summary, webform_quiz_webform_element_options, webform_quiz_correct_answer_description, webform_quiz_webform_multiple, webform_quiz_webform_options, view, paragraphs_actions, paragraph_operations, datelist, datetime, break_lock_link, weight, pager, file, dropbutton, number, operations, token, actions, hidden, html, checkbox, password_confirm, status_report, email, form, color, page, ajax, page_title, html_tag, radio, value, submit, tel, label, fieldgroup, date, inline_template, range, select, status_messages, table, component, container, search, more_link, language_select, details, path, item, url, image_button, textarea, radios, vertical_tabs, tableselect, checkboxes, system_compact_link, button, machine_name, fieldset, link, textfield, password, entity_autocomplete in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of /var/www/html/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

🐛 Bug report
Status

Active

Component

Code

Created by

🇬🇧United Kingdom spencer95@gmail.com Swansea/Cardiff

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024