Problem/Motivation

I installed the module and tried to open the settings page of the module and get the following exception:

ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /var/www/html/web/modules/contrib/trailing_slash/src/Form/SettingsForm.php on line 35 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 44 of core/lib/Drupal/Core/Form/ConfigFormBase.php).

Steps to reproduce

Install the module in D11 and open https://example.org/admin/config/trailing-slash/settings

Proposed resolution

Fix DI of the module.

Remaining tasks

-

User interface changes

-

API changes

-

Data model changes

-

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

tobiasb created an issue. See original summary.

tobiasb’s picture

Assigned: tobiasb » Unassigned
Status: Active » Needs review
hexabinaer’s picture

Status: Needs review » Reviewed & tested by the community

Settings page accessible with this patch \o/

astonvictor’s picture

works for me, merged to the dev branch
thanks a lot

astonvictor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

srijeeta’s picture

Version: 2.0.x-dev » 2.0.0-alpha3

The settings page is still breaking for me for the module version 2.0.0-alpha3 with the same error in Drupal 11:

ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /var/www/html/web/modules/contrib/trailing_slash/src/Form/SettingsForm.php on line 35 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 44 of core/lib/Drupal/Core/Form/ConfigFormBase.php).

tobiasb’s picture

Version: 2.0.0-alpha3 » 2.0.x-dev

@srijeeta You need to patch the module until the fix is released.

https://github.com/cweagans/composer-patches