Skip to content

[6.x] Save event not caught after adding multiple fields (>= 2) to Blueprints or Fieldsets (toast opens) #12664

@ebeauchamps

Description

@ebeauchamps

Bug description

Feel free to change the title

You add 2+ fields to a Blueprint or a Fieldset, by only clicking on "Apply" (and not "Apply & Save") after creating each field, then you click on "Save" in the main Blueprint or Fieldset window where those fields are displayed.

When you try exiting the window by clicking on Collection or Taxonomy or whatever in the sidebar, a toast is fired: "You have unsaved changes. Are you sure you want to leave this page?".

You have to click at least twice on "Cancel" or "OK" for the toast to close (I added 2 fields. I don't know if the behavior is similar when adding 3 fields or more).

I was expecting that Saving on the main Blueprint or Fieldset window would save all changes made, including adding my 2 fields, without firing a "confirmation toast".

"Confirm dirty navigation" is set to TRUE (default) in my user settings.

How to reproduce

  • Check your user preferences: "Confirm dirty navigation" should be set to the default TRUE
  • Edit an existing blueprint or fieldtype
  • Add a first field (ie radio) and click on APPLY
  • Add a second field (ie checkbox) and click on APPLY
  • Click on SAVE
  • Try exiting the window by clicking on another sidebar menu such as Collection, Taxonomy or User

Logs

Environment

Environment
Application Name: StatamicFrenchTest
Laravel Version: 12.32.5
PHP Version: 8.4.13
Composer Version: 2.8.11
Environment: local
Debug Mode: ENABLED
URL: statamic6.test
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Statamic
Addons: 0
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.0.0-alpha.10 PRO

Installation

Other (please explain)

Additional details

CLI: Statamic update from v6 Alpha 9 to Alpha 10 (choice 1 => composer update)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions