Problem/Motivation

#3549282: Improve module code quality checks made a change to the type check in ViewsBulkOperationsBulkForm::init where instead of checking empty($definition['type']) it now checks $definition['type'] === ''.

This means any action that does not define a type is no longer available in the VBO form. Adding type: '' to the plugin definition fixes this but this is a BC break.

Steps to reproduce

Configure an action plugin with no type set.
Notice this Action isn't available in the VBO field form

Proposed resolution

Check for NULL too.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

acbramley created an issue. See original summary.

acbramley’s picture

Status: Active » Needs work
Issue tags: +Needs tests
graber’s picture

I'm afraid no one will write those tests for a long time so I'll just release a fix and leave this open. I'll solve this in the action manager only by making sure $definition['type'] is always a string for later consistency.
Thank you for reporting and the initial work!

graber’s picture

Status: Needs work » Needs review

Pushed a solution, please review and test.

acbramley’s picture

Issue tags: -Needs tests

I think it's quite important to cover this with tests so we don't have another BC break in the future, I've added some basic testing.

graber’s picture

Status: Needs review » Fixed

Thanks, checked and the test is indeed failing with the previous code, merging. It'll be good to extend test coverage even more, I'll write an issue next week.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.