You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DirectEditing Manager::getTemplates() crashes when a creator returns ATemplate objects (per interface contract) #64461
From the Nextcloud Android app (v35.0.0), tap "+" → "New document" (or spreadsheet).
App calls GET /ocs/v2.php/apps/files/api/v1/directEditing/templates/richdocuments/document (and /spreadsheet).
Expected behaviour
Template list is returned, template picker opens.
Actual behaviour
500 error, request fails every time, for every creator type (document, spreadsheet — both tested). Exception in nextcloud.log:
Cannot use object of type OCA\Richdocuments\DirectEditing\OfficeTemplate as array in file
'/var/www/html/lib/private/DirectEditing/Manager.php' line 91
This array-mutation code appears unchanged since at least Nextcloud 30 (checked v30.0.0 tag, identical logic), so it silently relied on apps returning raw arrays despite the interface declaring ATemplate[] since 18.0.0. Any app that follows the documented contract literally (as richdocuments now does, after its recent OCP\DirectEditing refactor) breaks this code with a fatal error.
Activity
icewind1991 commentedon Sep 17, 2026
Thanks for the report and finding the root cause, fix is here: #64494