ArgumentCountError: Too few arguments to function Drupal\views\Plugin\views\field\BulkForm::__construct(),
5 passed in web\modules\contrib\draggableviews\src\Plugin\views\field\DraggableViewsField.php on line 65
and exactly 6 expected in Drupal\views\Plugin\views\field\BulkForm->__construct() (line 85 of \web\core\modules\views\src\Plugin\views\field\BulkForm.php)
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 2992430-n16.patch | 2.06 KB | hanoii |
Comments
Comment #2
pasqualleComment #3
steveoriolI confirm that the patch #2 works for me, thanks Pasqualle
Comment #4
darvanenPatch applies cleanly and works nicely.
Code checks out.
RTBC
Changing this to critical because it causes WSOD on updating core to 8.6 which is now a full release.
Comment #5
darvanenOh... but this change isn't going to be backwards-compatible. Might require a new branch?
Comment #6
ConradFlashback commented#2 works, thanks Pasqualle.
Please commit, this is a major problem.
Comment #7
cprofessionals commented#2 patch resolved my issue as well. Thanks
Comment #8
el1_1el commentedsite is completely inaccesssable without patch in 2
Comment #9
ConradFlashback commentedIs this project still alive?
This is a critical bug.
Comment #10
therobyouknow commentedThank you @
Comment #2Pasqualle
- for the patch in comment 2. I found this to fix this issue.
Comment #11
caspervoogt commentedRTBC. Works fine; without it my site is unusable on D8.6.
Comment #12
albertski commented#2 patch fixes the issue for me. Thanks!
Comment #13
kobb commentedThis module is unusable without this patch. Thanks @Pasqualle.
Comment #14
hanoiiIs this backward compatible with older versions of drupal 8.x? just something to think about
Comment #15
vierlex@hanoii probably not :/
Since the constructur / dependency injection thing of BulkForm changed.
One could not overwrite the constructors / do the dependency injection thing and calling the services as they are needed inside the methods, might make it compatible with older drupal versions, but is bad practice as far as i know..
Comment #16
hanoiiI recently got co-maintainer access and will soon commit a patch/fix for this. I went with a different approach, appreciate more testings.
This will work with 8.5 as well as being more future proof.
I am using this pattern used by search api: https://www.previousnext.com.au/blog/safely-extending-drupal-8-plugin-cl....
I will commit it soon, but if somebody can test it, the better!
Comment #17
hanoiiComment #18
darvanenThat looks like it will work. One thing I would do is put in a comment regarding the non-standard use of the container and why it is necessary for a few reasons:
Comment #19
hanoiiI wouldn't call it non-standard: https://symfony.com/doc/current/service_container/injection_types.html#s..., but feel free to submit a patch with the suggested documentation.
Was anybody able to test the patch?
Comment #20
vierlexWoa thanks @hanoii for the pattern links!! I like this stuff.
Havent got a chance to test it on a lower version than 8.5 since we already updated every page to 8.6
Comment #21
darvanenThe injection as a setter is fine, but there isn't a single example in core of create() being extended with regards to container injection. However, I take your point, having now read your linked article properly I concede that it doesn't really require a warning.
I've tested on 8.6 in our complicated build with no issues, don't have anywhere to test 8.5 at the moment, sorry. I spun up a test site with a standard install and turned on the demo from the module, but that didn't work in 8.5 or 8.6, with or without the patch, and I don't have the time to troubleshoot it.
Comment #22
igonzalez commented#16 patch fixes the issue for me.
Thanks!
Comment #24
hanoiiThis has been committed, I will soon release a new version seeing if it's safe to do so and then might try to wrap up other issues.