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
The \Drupal\views_ui\ViewEditForm::form(array $form, array &$form_state)
build a form which is potentially contains other settings forms of various type of plugins, for example: settings form of a field formatter plugin.
Maybe these plugin forms use the #ajax feature of the FormAPI or set the $form_state['cache']
to TRUE, if so the form process (validate and submit) will be broken because the core/modules/views_ui/admin.inc
file is not loaded and the views_ui_form_button_was_clicked()
function is not available.
Proposed resolution
Use the form_load_include()
to add the required files to the $form_state.
Comment | File | Size | Author |
---|---|---|---|
#1 | drupal-view-edit-form-include-2259253-01-d8.patch | 651 bytes | Sweetchuck |
Comments
Comment #1
SweetchuckComment #11
LendudeCleaning up old issues.
#1904854: Convert Views UI to routes added
to \Drupal\views_ui\ViewFormBase::init, so I think this is covered. Please feel free to re-open this if you feel this is still something that needs to be addressed