Add #submit attribute to ConfigureAction form

Created on 9 March 2023, over 1 year ago
Updated 3 January 2024, 6 months ago

Problem/Motivation

We have recently updated the module from 1.14 to 2.2.x and encountered a strange bug. We have a custom action that extends ViewsBulkOperationsActionBase and since the update this action was broken. The reason is that the submitConfigurationForm was not triggering, so certain data that we require was missing in the execute() handler.

After debugging, I discovered that submitForm() in ConfigureAction was not triggering at all, so thats why also the submitConfigurationForm was not triggering as a result. I quickly noticed that VBO is not adding the #submit attribute to the submit button, even though it is added in the ConfirmAction form. When I add the #submit parameter, everything worked as expected. So I do believe that the #submit should be also added to the ConfigureAction. That way we have consistency between both forms and also it fixes this bug that I encounter.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Postponed: needs info

Version

4.2

Component

Core

Created by

🇸🇮Slovenia nkoporec Slovenia

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

Comments & Activities

  • Issue created by @nkoporec
  • @nkoporec opened merge request.
  • Status changed to Needs review over 1 year ago
  • 🇸🇮Slovenia nkoporec Slovenia
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.2 & MySQL 8
    last update 9 months ago
    15 pass
  • 🇸🇮Slovenia nkoporec Slovenia
  • Status changed to Postponed: needs info 6 months ago
  • 🇵🇱Poland Graber

    I think you need to do more debugging for your custom action, submitForm() is the default form submit handler and if nothing else is specified in the pressed button #submit, it has to be executed. Does your custom action add this array key to the button perhaps? Good spot with the ConfirmAction form, not sure when that #submit was added there but it shouldn't be needed.

Production build 0.69.0 2024