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
Issue fork views_bulk_operations-3553964
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
Comment #3
acbramley commentedComment #4
graber commentedI'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!
Comment #5
graber commentedPushed a solution, please review and test.
Comment #6
acbramley commentedI 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.
Comment #7
graber commentedThanks, 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.