Problem/Motivation
This dev Module installed successfully, but when selecting Comment notification area under admin/config, the following error is generated:
The website encountered an unexpected error. Try again later.
ArgumentCountError: Too few arguments to function Drupal\Core\Form\ConfigFormBase::__construct(), 1 passed in /modules/contrib/comment_notify/src/Form/CommentNotifySettings.php on line 76 and exactly 2 expected in Drupal\Core\Form\ConfigFormBase->__construct() (line 43 of core/lib/Drupal/Core/Form/ConfigFormBase.php).
Steps to reproduce
Uninstalled module and Reinstalled module, with same error. Attached is error screen.
This was installing on Drupal version 11.0.4
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | comment-notify_after.png | 173.85 KB | tirupati_singh |
| #7 | comment-notify_before.png | 287.84 KB | tirupati_singh |
| #3 | Screenshot from 2024-09-17 11-39-27.png | 185.1 KB | sourav_paul |
| #3 | Screenshot from 2024-09-17 11-27-38.png | 530.05 KB | sourav_paul |
| Error Screen - Comment Notify 8.x.1-dev module.jpg | 39.11 KB | lee56 |
Issue fork comment_notify-3474577
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
Comment #2
lee56 commentedComment #3
sourav_paulI've replicated the issue on D11.
I've Fixed the issue..
Please review.
Attaching SS for reference:

before:
after:

Comment #5
sourav_paulPlease don't forget to release new version for drupal 11.
Comment #6
sourav_paulComment #7
tirupati_singh commentedHi, I've applied the provided MR as a patch and it applied cleanly without any errors. After applying the patch the configuration page of the module is now accessible and the module functionality is working as expected, tested on Drupal 11.0.5. I'm attaching the screenshots of the before and after fixes for reference.
Thanks!
Comment #8
klemendev commentedTested on Drupal 11.1.1 and 10.4.1 and the configuration page opens in both instances with this MR applied as a patch. RTBC from my side
Comment #9
solideogloria commentedComment #11
gregglesThanks for the help, everyone!