Problem/Motivation

I upgraded to Drupal 11.2.5 along with the latest Slick extras 2.0.1 version and got the following error when going to the development tab in the Slick UI page. (/admin/config/media/slick/devel)

 ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /var/www/html/web/modules/contrib/slick_extras/slick_devel/src/SlickDevelSettingsForm.php on line 27 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 44 of core/lib/Drupal/Core/Form/ConfigFormBase.php).
 
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

grgcrlsn321 created an issue. See original summary.

grgcrlsn321’s picture

Status: Active » Needs review

I updated the configuration form to fix the constructor. Setting to needs review.

gausarts’s picture

Status: Needs review » Needs work

Thank you.

For future compatibility we should remove the constructor entirely, and rely on static ::create() to allow Core change anything later. new static() is a best practice in Drupal. Many samples are in Blazy environment. The closest is Ajaxin:

https://git.drupalcode.org/project/ajaxin/-/commit/a09e840fd0d3ed5ea395a...

Or here is the final result for better read:
https://git.drupalcode.org/project/ajaxin/-/blob/2.0.x/src/Form/AjaxinSe...

Feel free to update it.

grgcrlsn321’s picture

Status: Needs work » Needs review

Good call! Thanks for the examples. I've updated the code and setting back to needs review.

  • gausarts committed d3c45c49 on 2.0.x
    Issue #3552184 by grgcrlsn321: Development tab broken for form on Slick...
gausarts’s picture

Status: Needs review » Fixed

Thank you for contributions.

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

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

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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