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

CommentFileSizeAuthor
#2 3225564-2.patch444 byteslarisse

Comments

larisse created an issue. See original summary.

larisse’s picture

Assigned: larisse » Unassigned
Status: Active » Needs review
StatusFileSize
new444 bytes

A patch to fix this.

larisse’s picture

larisse’s picture

Title: Error when set notify permissions in Drupal 8 version » Error when set notify permissions
cbeem’s picture

That worked, thank you :)

  • larisse authored e6397f9 on 2.0.x
    Issue #3225564 by larisse: Error when saving user configuration
    
gisle’s picture

Title: Error when set notify permissions » Error when saving user configuration
Status: Needs review » Fixed

Larisse, thanks for the patch!
CBEEM, thanks for the bug report and the review.

This has been committed to latest 2.0.x-dev snapshot.

Status: Fixed » Closed (fixed)

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