Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[6.x]: No way for custom element types to add top level buttons in toolbar or beside the Save menu

オープン
#19,910 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@brianjhanson がすでに取り組んでいます。

2026年10月9日 から。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
15/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
php
領域
backend, frontend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

bug repo:cms
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.) in ElementEditorActions::buttonActions(). Plugins can append to it via ElementEditorPayloadResolving, but every button is wired to submitAction(), 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
主要言語
PHP
スター
3.6k
フォーク
710
平均マージ
11時間 29分
マージ済み PR(30日)
265

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

craftcms/cms のほかの issue

craftcms/cms の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。