Skip to content

[Bug]: F-05 Direct editing: templates of ACreateFromTemplate creators cause a fatal error #65064

Open

Description

@nicolassp

⚠️ This issue respects the following points: ⚠️

  • This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug (if unsure, ask the Community Help Forum).
  • This issue is not already reported on Github OR solved at the Community Help Forum (I've searched!).
  • I'm using a maintained major version of Nextcloud Server and tested against the latest patch level. (Supported major versions and current patch levels).
  • I agree to follow Nextcloud's Code of Conduct.
  • I've tried my best to provide clear reproduction steps that someone unfamiliar with this bug could use to reproduce it.

Bug description

F-05 · Direct editing: templates of ACreateFromTemplate creators cause a fatal error

Severity Medium (feature unusable)
Component lib/private/DirectEditing/Manager.php::getTemplates() (35.0.1 line 91)
Verified Unit test fails on 35.0.1 with Error: Cannot use object of type ... as array

ACreateFromTemplate::getTemplates() returns ATemplate objects, Manager::getTemplates() writes
$template['extension'] and $template['mimetype'] into them. ATemplate implements
JsonSerializable but not ArrayAccess, so every editor that offers templates through the OCS
endpoint /ocs/v2.php/apps/files/api/v1/directEditing/templates/{editor}/{creator} fails.

Fix: serialize templates with jsonSerialize() before adding the fields.

Related (not fixed, reported only): lib/private/DirectEditing/Token.php line 33 calls
Manager::getShareForToken(), which does not exist. The path is reached when a token was created
with a share (Manager::createToken(..., $share)); core never passes one, apps can.

Steps to reproduce

see the top

Expected behavior

see the top

Nextcloud Server version

35

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

Activity

  1. added theissue type on Oct 3, 2026
  2. added
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Oct 3, 2026
  3. jim-sang commented on Oct 22, 2026

    @jim-sang

    Looks like a duplicate of #64461 — same Manager.php:91 / ACreateFromTemplate contract mismatch — and there is a fix proposed in #64494.

    Still reproducible on the current stable 35.0.2.2 with richdocuments 12.0.1; details, trigger condition and impact are in #64461.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmap35-feedbackbug

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions