Skip to content

fix: corrently handle direct editor creator returned templates - #64494

Merged
come-nc merged 2 commits into
masterfrom
direct-template-fix
Nov 9, 2026
Merged

come-nc merged 2 commits into
masterfrom
direct-template-fix

Conversation

@icewind1991

@icewind1991 icewind1991 commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Summary

ACreateFromTemplate::getTemplates returns ATemplate[], not array[]. So convert them to arrays.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

fixes #64461

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 added this to the Nextcloud 36 milestone Sep 17, 2026
@icewind1991
icewind1991 requested a review from a team as a code owner September 17, 2026 15:58
@icewind1991
icewind1991 requested review from Altahrim, come-nc, leftybournes and salmart-dev and removed request for a team September 17, 2026 15:58
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Sep 17, 2026
@icewind1991

Copy link
Copy Markdown
Member Author

/backport to stable35

@icewind1991

Copy link
Copy Markdown
Member Author

/backport to stable34

@icewind1991

Copy link
Copy Markdown
Member Author

/backport to stable33

Signed-off-by: Robin Appelman <robin@icewind.nl>
@jim-sang

Copy link
Copy Markdown

Confirmed this is still needed and still reproduces on 35.0.2.2 with richdocuments 12.0.1 (same 500 at Manager.php:91).

Two data points that may help the review:

  • It only fails when the creator returns a non-empty template list; users whose Templates/ folder is empty never hit it — probably why reports are sporadic.
  • It affects both the mobile API and the web "New" menu, and every failed attempt adds an entry to the admin "Errors in the log" setup check.

Full analysis is in #64461. The backport requests (stable33/34/35) also still look pending. Anything I can do to help this land?

@small1

small1 commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

I tested this patch and i get rids of the error message in the log.

@szaimen szaimen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐘

@come-nc
come-nc merged commit 172fe36 into master Nov 9, 2026
155 checks passed
@come-nc
come-nc deleted the direct-template-fix branch November 9, 2026 16:25
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DirectEditing Manager::getTemplates() crashes when a creator returns ATemplate objects (per interface contract)

5 participants