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

Ouverte
#67,024 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
38/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
php
Domaine
backend

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
PHP
Étoiles
37.6k
Forks
5.4k
Merge moyen
1 j 13 h
PR mergées (30 j)
623

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de nextcloud/server

Toutes les issues de nextcloud/server

Issues similaires

Plus d'issues PHP

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.