Warning dialog not displayed after updating site handle
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript, php
Research direction
Start with resources/js/pages/sites/Edit.vue, linked in the issue, and inspect how initialSiteHandles and currentSiteHandles are initialized and compared. Reproduce the steps at /cp/sites by changing a handle and saving; done means the warning dialog appears and the change is saved only after confirmation. A linked open pull request (#15722) indicates work is already underway.
Written by the indexing model from the issue text.
Description
Bug description
In site configuration page, updating a site handle and clicking Save shows a success toast message immediately.
A warning confirmation dialog is included in the codebase but is never displayed. As a result, users don't get to see the warning dialog with its message: Warning! Changing a site handle may break existing site content!'.
Possible cause:
In Edit.vue (resources/js/pages/sites), the computed property initialHandleChanged always returns false. It seems currentSiteHandles holds a reference to the same array as initialSiteHandles, not a copy, so updating one updates the other.
Expected result:
A confirmation dialog with its warning message appears. The change is saved only after the user confirms.
Actual result:
No dialog appears. The change is saved immediately, and a success toast is shown.
How to reproduce
https://github.com/user-attachments/assets/56b94ba7-c24a-4dbc-86b3-f9c7fc8d070a
- Go to /cp/sites.
- Change the
Handlefield value of a site (for example, default → main). - Click Save.
Logs
Environment
Environment
Laravel Version: 12.69.2
PHP Version: 8.3.10
Composer Version: 2.10.2
Environment: local
Debug Mode: ENABLED
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
License Key: Not set
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 5.70.0 PRO
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
- Dominant language
- PHP
- Stars
- 4.9k
- Forks
- 647
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 137
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from statamic/cms
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
auth needs more info
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
statamic/cms#15698 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
accessibility
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
[7.x] Reintroduce parser error for mixed pipe/shorthand modifier syntaxPossibly taken A pull request linked to this issue is open or already merged. Openantlers
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
Automattic/blocks-engine#3438 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
getgrav/grav-plugin-api#66 ·
-
Document Laravel 12/13 attributes that work in modules (UsePolicy, ObservedBy, UseFactory, Bind)Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
nWidart/laravel-modules#2236 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day