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)

Comments

Pasqualle created an issue. See original summary.

pasqualle’s picture

Status: Active » Needs review
StatusFileSize
new1.63 KB
steveoriol’s picture

I confirm that the patch #2 works for me, thanks Pasqualle

darvanen’s picture

Priority: Normal » Critical
Status: Needs review » Reviewed & tested by the community

Patch 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.

darvanen’s picture

Oh... but this change isn't going to be backwards-compatible. Might require a new branch?

ConradFlashback’s picture

#2 works, thanks Pasqualle.
Please commit, this is a major problem.

cprofessionals’s picture

#2 patch resolved my issue as well. Thanks

el1_1el’s picture

site is completely inaccesssable without patch in 2

ConradFlashback’s picture

Is this project still alive?
This is a critical bug.

therobyouknow’s picture

Thank you @
Comment #2Pasqualle

- for the patch in comment 2. I found this to fix this issue.

caspervoogt’s picture

RTBC. Works fine; without it my site is unusable on D8.6.

albertski’s picture

#2 patch fixes the issue for me. Thanks!

kobb’s picture

This module is unusable without this patch. Thanks @Pasqualle.

hanoii’s picture

Is this backward compatible with older versions of drupal 8.x? just something to think about

vierlex’s picture

@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..

hanoii’s picture

StatusFileSize
new2.06 KB

I 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!

hanoii’s picture

Status: Reviewed & tested by the community » Needs review
darvanen’s picture

That 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:

  1. It will help us remember why it is like that in future years
  2. It will help avoid confusion for any newer developers
  3. Relatedly, it should help avoid this non-standard usage proliferating in unnecessary places
hanoii’s picture

I 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?

vierlex’s picture

Woa 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

darvanen’s picture

The 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.

igonzalez’s picture

#16 patch fixes the issue for me.

Thanks!

  • hanoii committed 11448dc on 8.x-1.x
    Issue #2992430 by hanoii, Pasqualle, Darvanen, vierlex: Drupal 8.6 error...
hanoii’s picture

Status: Needs review » Fixed

This 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.

Status: Fixed » Closed (fixed)

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