Warning dialog not displayed after updating site handle
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, php
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- PHP
- Star
- 4.9k
- Fork
- 647
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 137
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của statamic/cms
-
multisite ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Setting up URL to a custom elevated session page in config/statamic/users.php won't work in CpĐang mởauth needs more info
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
statamic/cms#15698 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Make native filesystem directory permissions configurable to support shared POSIX ACL accessĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
antlers
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
woocommerce/woocommerce-paypal-payments#4838 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
nunomaduro/dev-null.sh#1161 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100