Problem/Motivation

When both monitoring_mail and monitoring_slack are enabled, the two modules alter the same monitoring_settings form without setting #tree on their fieldsets. Both add a severities checkboxes element at the top level, so Drupal generates identical HTML input names (severities[OK], severities[WARNING], …) for both fieldsets.

Result:

  • Only one severities value exists in $form_state — both submit handlers read the same value.
  • You cannot have different severities for email and Slack notifications.
  • Saving monitoring.settings writes the same severities into both monitoring_mail.settings and monitoring_slack.settings.

Steps to reproduce

  1. Enable monitoring, monitoring_mail, monitoring_slack.
  2. Go to Configuration → System → Monitoring settings.
  3. Tick WARNING under Mail notifications and CRITICAL under Slack notifications.
  4. Save.
  5. Reload — both fieldsets show the same severities.

Proposed resolution

Add #tree => TRUE on the slack fieldset so all Slack fields namespace under slack[*]. Update the submit handler, the test-button submit handler and #limit_validation_errors to use the nested paths.

API changes

None.

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

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

  • mably committed a56aba45 on 1.x
    fix: #3586575 Settings form field values collide with monitoring_mail...
mably’s picture

Status: Needs review » Fixed

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

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

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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