Problem/Motivation
I installed this module in Drupal 8.9.16 version and when I set the Notify Settings for a user, when I try to save the configurations, I get the error message:
The website encountered an unexpected error. Please try again later.
Error: Call to a member function delete() on null in Drupal\notify\Form\UserSettings->submitForm() (line 231 of modules/contrib/notify/src/Form/UserSettings.php).
Steps to reproduce
1) Install the module in a Drupal 8 site version
2) Go to People -> select a user -> notify settings
3) Put your configurations
4) Click in Save Configuration
Proposed resolution
I notice that $db_connection is not declared in submitForm function from UserSettings.php file. Declare this variable there.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3225564-2.patch | 444 bytes | larisse |
Comments
Comment #2
larisse commentedA patch to fix this.
Comment #3
larisse commentedThis error is not occur only in Drupal 8 version, but is a bug in 2.0.x-dev from this module.
See #3225591: Error with latest dev 2.0 - The website encountered an unexpected error. Please try again later.
Comment #4
larisse commentedComment #5
cbeem commentedThat worked, thank you :)
Comment #7
gisleLarisse, thanks for the patch!
CBEEM, thanks for the bug report and the review.
This has been committed to latest 2.0.x-dev snapshot.