Attachment menu disabled ("shared from another cloud") in fileless embeds — breaks Deck card descriptions
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
- 領域
- frontend
調査の方向性
src/createEditor.ts から始めて、fileless createMarkdownContentEditor パスをたどり、その後 src/components/Menu/ActionAttachmentUpload.vue と src/components/SuggestionsBar.vue の添付ファイルチェックを確認します。Issue で説明されている Deck description embed を再現し、添付ファイルメニューが有効なままであること、ホストが提供する onFileInsert hook に到達できること、アップロード専用の項目が非表示のままであることを検証します。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
Any host app that embeds Text without a fileId (i.e. createEditor/createMarkdownContentEditor, the fileless "markdown content" path) gets its attachment menu permanently disabled, with the misleading tooltip:
Attachments cannot be created or uploaded because this file is shared from another cloud.
There is no federated share and no other cloud involved — there is no file at all.
The most visible victim is Deck card descriptions, reported as nextcloud/deck#7748 (still open, no root cause posted). I traced it and the defect is here in Text, not in Deck.
Root cause
The gate introduced in #7154 (hasOwner, merged 2025-05-06, fixing #7092) assumes a document session always exists. In the fileless embed path it never does.
-
Deck embeds Text with content only, no
fileId:
https://github.com/nextcloud/deck/blob/main/src/components/card/Description.vuethis.editor = await window.OCA.Text.createEditor({ el: this.$refs.editor, content: this.card.description, readOnly: !this.canEdit, onFileInsert: () => { this.showAttachmentModal() }, // <-- host-provided hook }) -
In
src/createEditor.ts,optionsForCollaboration()isBoolean(options.fileId) && (options.useSession ?? true)→ false, socreateMarkdownContentEditor()rendersMarkdownContentEditorApp.vue. -
provideConnection()is called only fromsrc/components/CollaborativeEditor.vue. The markdown-content path never calls it, so the injectedopenDatastaysundefined. -
src/components/Menu/ActionAttachmentUpload.vue:isUploadDisabled() { return !this.openData?.hasOwner || !this.networkOnline }undefined?.hasOwner→undefined→ falsy → disabled, andmenuTitlefalls through to the federated-share string.
src/components/SuggestionsBar.vue:107 has the identical check and the identical wrong message.
The irony: provideHooks() in createEditor.ts does provide ACTION_ATTACHMENT_PROMPT from options.onFileInsert, so the host app has already supplied a working "insert file" implementation — Text disables the button before that hook can ever fire. Meanwhile EDITOR_UPLOAD is only provided on the collaborative path, so "Upload from computer" is already correctly hidden in this mode. The only entry that should be reachable is "Insert from Files", which delegates to the host and does not need a file owner.
Steps to reproduce
- Install and enable Deck and Text.
- Open any Deck card, edit the description with the rich text editor.
- Hover the paperclip in the toolbar.
- It is greyed out with the "shared from another cloud" tooltip. Uploading via the card's Attachments tab works fine (that path does not go through Text).
Expected behaviour
In the fileless / createMarkdownContentEditor embed, the attachment menu should stay enabled and "Insert from Files" should call the host-provided onFileInsert hook. The hasOwner restriction from #7154 is meaningful only when a document session exists.
Suggested fix
Only apply the owner gate when a connection was actually provided, rather than treating "no session" as "no owner". Something like:
isUploadDisabled() {
if (!this.networkOnline) { return true }
// No connection at all => fileless embed; the host app owns attachment handling.
if (this.openData === undefined && !this.$editorUpload) { return false }
return !this.openData?.hasOwner
}
and the same in SuggestionsBar.vue. Separately, the tooltip should not claim "shared from another cloud" for every falsy hasOwner — worth distinguishing "no owner" from "federated".
Versions
Reproduced on:
| Nextcloud | 34.0.1 |
| Text | 8.0.0 |
| Deck | 1.18.2 |
| PHP | 8.3 |
| DB | PostgreSQL 17 |
| Browser | Chrome |
Also reported against NC 32.0.4 / Deck 1.16.3 and NC 33.0.3 in nextcloud/deck#7748, i.e. present since the #7154 merge.
- 主要言語
- JavaScript
- スター
- 665
- フォーク
- 133
- 平均マージ
- 1日 17時間
- マージ済み PR(30日)
- 172
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nextcloud/text のほかの issue
-
0. Needs triage bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
nextcloud/text#9482 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
0. Needs triage bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
folder description not shows when using folder tree to navigate再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug feature: folder description
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
1. to develop design call discuss discussion ux
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
nextcloud/text#9334 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug documentation
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
awslabs/visual-asset-management-system#880 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
possible bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Mintplex-Labs/anything-llm#6889 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
swc-project/swc-next#1165 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nhsuk/nhsuk-prototype-kit-package#439 ·
メンテナーはふだん 1 日以内に返信