Skip to content

Bug: "Enable Mobile Responsive" toggle resets to on after every notification update #125

@AmitPaul-akp

Description

@AmitPaul-akp

Describe the bug

The "Enable Mobile Responsive" toggle (Customize → Themes → Mobile in the notification builder) automatically resets to on every time an existing notification is updated, even if the user had explicitly turned it off and saved it that way. The user's saved preference is silently overwritten on every save — there is no UI indication this is happening.

Steps to reproduce

  1. Create any NotificationX notification (e.g. WooCommerce Sales, WordPress reviews, etc.).
  2. Go to Customize → Themes → Mobile, toggle "Enable Mobile Responsive" to off.
  3. Save the notification.
  4. Reopen the same notification from the list and click Update without changing anything else.
  5. Reopen it once more.

Expected: the toggle stays off, as last saved.
Actual: the toggle is back to on; mobile responsive is silently re-enabled.

Video reproduction: https://d.pr/v/YkVmYO

Environment

  • NotificationX (Free): 3.2.7
  • NotificationX Pro: 3.1.2 (Pro is not involved — the bug is in Free)
  • WordPress: latest
  • Tested in current Chrome / Safari

Root cause

In nxdev/notificationx/components/WrapperWithLoader.tsx, a useEffect keyed on builderContext.values.type fires whenever the type changes — including when an existing notification's saved type populates the form on edit. Inside that effect, setFieldValue("is_mobile_responsive", nx_type !== "custom") is called unconditionally, overwriting the user's saved toggle before they even touch the form.

Reported by

Client report via Fluent Boards — #81297 Bug Fix: NotificationX mobile responsive setting automatically re-enables after notification update.

Fix

Pull request: #124 — guards the override behind an nx_id check so the type-change default only applies when creating a new notification; existing entries keep the user's saved value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions