Skip to content

fix(templates): deduplicate provider templates - #56722

Merged
elzody merged 1 commit into
masterfrom
fix/deduplicate-templates
Dec 10, 2025
Merged

fix(templates): deduplicate provider templates#56722
elzody merged 1 commit into
masterfrom
fix/deduplicate-templates

Conversation

@elzody

Copy link
Copy Markdown
Contributor

Summary

This PR de-duplicates provider templates. This will prevent the same global template from showing up twice in the template picker, as you can see in the screenshots. The reason this happens is because apps can provide the same template for several MIME types and there does not seem to be a way for an app to de-duplicate them itself. It is given one MIME type at a time when called by the server, so it is just expected to return the matching templates for that type and cannot know whether a given template has already been returned.

Screenshots

Beforeimage
Afterimage

Checklist

@elzodyelzody self-assigned this Nov 26, 2025
@elzody
elzody requested a review from a team as a code ownerNovember 26, 2025 18:56
@elzody
elzody requested review from Altahrim, leftybournes, salmart-dev and yemkareems and removed request for a teamNovember 26, 2025 18:56
@elzody

Copy link
Copy Markdown
ContributorAuthor

The failing tests are not related to these changes from what I can tell.

@juliusknorr
juliusknorrforce-pushed the fix/deduplicate-templates branch 2 times, most recently from af17860 to b5fc422CompareDecember 3, 2025 09:25
@elzody
elzodyforce-pushed the fix/deduplicate-templates branch from b5fc422 to 70f0a52CompareDecember 9, 2025 18:57
Comment threadlib/private/Files/Template/TemplateManager.php
@elzody
elzodyforce-pushed the fix/deduplicate-templates branch from 70f0a52 to d37f53cCompareDecember 9, 2025 20:14
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
@elzody
elzodyforce-pushed the fix/deduplicate-templates branch from d37f53c to 3a89c18CompareDecember 10, 2025 21:06
@elzody
elzody merged commit 070ec61 into masterDec 10, 2025
199 of 202 checks passed
@elzody
elzody deleted the fix/deduplicate-templates branch December 10, 2025 23:21
@elzody

Copy link
Copy Markdown
ContributorAuthor

/backport to stable32 please

@nextcloudnextcloud deleted a comment from backportbotBotDec 12, 2025
@elzody

Copy link
Copy Markdown
ContributorAuthor

/backport to stable31 please

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@elzody@juliusknorr@miaulalala@CarlSchwan