Office: "New document" template listing still 500s on 35.0.3 (fix #64494 is 36-only)

未关闭
#67,024 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
php
领域
backend

调研方向

Start with lib/private/DirectEditing/Manager.php around line 91 and compare the stable35 implementation with the v36 fix in #64494. The report identifies an array access on an ATemplate object as the failure; determine whether a stable35 backport is appropriate and confirm the template listing works on 35.x.

由索引模型根据 Issue 内容生成。

描述

Steps to reproduce
  1. Nextcloud 35.0.3 (lscr.io/linuxserver/nextcloud:35.0.3-ls4), PHP 8.4, MariaDB 11.8.
  2. richdocuments 12.0.2 (occ app:update --showonly → "All apps are up-to-date"). Collabora CODE 26.04.6.2 self-hosted; occ richdocuments:activate-config passes every check and reports "Detected WOPI server: Collabora Online Development Edition 26.04.6.2".
  3. From the Nextcloud iOS app (35.2.2), tap "+" → new document. Same from the web UI.
Expected behaviour

The template picker opens.

Actual behaviour
GET /ocs/v2.php/apps/files/api/v1/directEditing/templates/richdocuments/document  ->  500
GET /ocs/v2.php/apps/files/api/v1/directEditing                                   ->  200

Cannot use object of type OCA\Richdocuments\DirectEditing\OfficeTemplate as array
in file '/app/www/public/lib/private/DirectEditing/Manager.php' line 91

Opening and editing existing office files is unaffected; only the template listing fails.

Root cause

This is the same defect as #64461, and the fix merged as #64494. I am filing this only because #64461 and #64494 are both closed and locked, so the question below cannot be asked there.

Core 35.0.2 and 35.0.3 ship lib/public/DirectEditing/ATemplate.php and declare ACreateFromTemplate::getTemplates(): ATemplate[]; richdocuments 12.0.2 returns ATemplate objects as specified, while Manager.php still does array access ($template['extension'] = …).

Why I am not just upgrading
  • Manager.php is byte-identical between tags v35.0.2 and v35.0.3, and stable35 still contains the array access.
  • #64494 is merged to master with milestone Nextcloud 36, so no 35.x release contains the fix.
Question

Is a stable35 backport intended, or should 35.x users expect the template listing to stay broken until 36? If it is 36-only by design, a one-line note on #64461 would help everyone arriving from the stable branch.

主要语言
PHP
星标
37.6k
派生
5.4k
平均合并
1 天 13 小时
30 天内合并 PR
623

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nextcloud/server 的其他 Issue

查看 nextcloud/server 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。