Skip to content

Multi-tenant plugin: "Leave without saving" prompt appears when navigating away from unmodified records #12826

Closed
@TomSteer

Description

@TomSteer

Describe the Bug

I've come across an issue with the multi-tenant plugin where the "Leave without saving" message appears when navigating away from page records when nothing has changed.

Link to the code that reproduces this issue

https://github.com/payloadcms/payload/tree/main/examples/multi-tenant

Reproduction Steps

Steps to reproduce

  1. Log in as super-admin (using demo@payloadcms.com credentials)
  2. Do not select any tenant in the tenant selector
  3. Open any page record
  4. Notice that the tenant selector automatically updates to match the tenant assigned to the page
  5. Try to navigate away from the page without making any changes
  6. A "Leave without saving" prompt appears even though no changes were made

Expected behavior

Since no changes were made to the record, navigating away should happen without any prompt.

Actual behavior

The system prompts with a "Leave without saving" message even though no changes were made to the record.

Additional information

  • This issue only occurs when initially loading the page without a tenant selected
  • If a tenant is selected before opening a page record, the issue does not occur

Which area(s) are affected? (Select all that apply)

plugin: multi-tenant

Environment Info

- payload: 3.41.0
- @payloadcms/plugin-multi-tenant: 3.41.0

Activity

added
status: needs-triagePossible bug which hasn't been reproduced yet
validate-reproductionAuto-added tag on create to tell bot to check recreation URL, removed after check.
on Jun 16, 2025
removed
validate-reproductionAuto-added tag on create to tell bot to check recreation URL, removed after check.
on Jun 16, 2025
added a commit that references this issue on Jun 27, 2025
16f5538
github-actions

github-actions commented on Jul 3, 2025

@github-actions
Contributor

🚀 This is included in version v3.45.0

github-actions

github-actions commented on Jul 11, 2025

@github-actions
Contributor

This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.

locked as resolved and limited conversation to collaborators on Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @TomSteer@JarrodMFlesch

    Issue actions

      Multi-tenant plugin: "Leave without saving" prompt appears when navigating away from unmodified records · Issue #12826 · payloadcms/payload