[6.x]: No way for custom element types to add top level buttons in toolbar or beside the Save menu
Maintainer thường phản hồi trong vòng 1 ngày
@brianjhanson đang làm issue này rồi.
Từ ngày 9/10/2026.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 15/100
Hướng nghiên cứu
Start with ElementEditorActions::buttonActions() and the ElementEditorPayloadResolving hook, which the issue says only ever wire buttons to submitAction(), and with the payload.previewTargets path used for the toolbar's View links. The open question is the API design: how a plugin can declare a non-submitting link, download or modal button for the toolbar or beside Save. Done means a maintainer-agreed extension point, not a patch, so check for a decision in the thread before writing code.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened?
The legacy editor rendered getAdditionalButtons() / additionalButtonsHtml() beside Save, which in Craft 5 sat in the page header, so these buttons were prominent at the top of the edit page. On the Inertia elements/Edit page:
editorActions.buttons(beside Save in the footer) is built from core actions (Create a draft, Apply draft, etc.) inElementEditorActions::buttonActions(). Plugins can append to it viaElementEditorPayloadResolving, but every button is wired tosubmitAction(), so it submits the editor's form. That suits save variants, not links, downloads or modals.- The toolbar's "View" links come from
payload.previewTargets. They're front-end URLs that also feed Live Preview, so they're not a fit for CP links.
There doesn't appear to be a way to add a non-submitting button (link, download, or modal) to the toolbar or beside Save, other than preview targets.
As a workaround, I've currently added previous custom plugin buttons that lived in these locations to the ⋯ action menu via extraActionMenuDescriptors(), but they're less discoverable there.
Craft CMS version
6.0.0-alpha.20
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
- Ngôn ngữ chính
- PHP
- Star
- 3.6k
- Fork
- 712
- Merge trung bình
- 13 giờ 8 phút
- Pull request đã merge (30 ngày)
- 366
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 craftcms/cms
-
bug repo:cms
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
craftcms/cms#20205 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[6.x]: Element index View menu: sort direction buttons only update after the table has loadedĐang mởbug repo:cms
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
craftcms/cms#20203 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[5.x] MCP: `configuration.update` fails for Matrix fields with TypeError on `$propagationMethod`Đang mởbug repo:cms
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 55/100
craftcms/cms#20406 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
repo:cms
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 73/100
craftcms/cms#20405 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[5.x]: MCP returns `[]` for CKEditor field valuesCó thể đã có người làm @i-just đã nhận hôm nay. Đang mởrepo:cms
craftcms/cms#20404 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Administration: required plugin configuration field stays invalid after restoring its saved valueĐang mởneeds-triage Platform(Default)
Độ 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
-
good first issue priority:low type:docs
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 95/100
crazy-goat/rabbit-stream#969 ·
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 68/100
opensourcepos/opensourcepos#4801 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Open-Locker/Open-Locker#368 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement priority Sales
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
novalo-dev/Prestashop-MCP-Server#190 ·
Maintainer thường phản hồi trong vòng 1 ngày