Updated: Comment #0
Problem/Motivation
I tried to set required input on a page view. A recoverable exception is thrown regarding the arguments passed to the Area plugin init method. InputRequired::preRender() creates an options array and passes it into AreaPluginBase::init() instead of a DisplayPluginBase object.
This was missed in the original issue #1850792: Make init() method consistent across all views plugins from VDC.
Recoverable fatal error: Argument 2 passed to Drupal\views\Plugin\views\area\AreaPluginBase::init() must be an instance of Drupal\views\Plugin\views\display\DisplayPluginBase, array given, called in core/modules/views/lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php on line 86 and defined in Drupal\views\Plugin\views\area\AreaPluginBase->init() (line 41 of core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php).
Proposed resolution
Implement the API correctly.
Remaining tasks
Write a test - possibly figure out why Drupal\views\Tests\Plugin\ExposedFormTest is not adequate?
Write a patch
User interface changes
None
API changes
None
Original report by mradcliffe
Comment | File | Size | Author |
---|---|---|---|
#4 | views-input-requred-2223251-4.patch | 2.48 KB | Berdir |
Comments
Comment #1
BerdirFound this too, this seems to work, still needs tests.
Comment #2
damiankloip CreditAttribution: damiankloip commentedComment #3
dawehner+1
Comment #4
BerdirTests!
Also, funny test, creating article node type but creating nodes with the default page node type :p Had to fix that to be able to test that I can select something and then it displays rows ;)
Comment #5
tim.plunkettWaiting to see the test results, but this looks good to me
Comment #7
tim.plunkettAwesome!
Comment #8
mradcliffeNice patch. Test looks good to me too.
Comment #9
catchCommitted/pushed to 8.x, thanks!