Bug 473991

Summary: Templates in .local/share/templates don't override /usr/share/templates
Product: [Frameworks and Libraries] frameworks-kio Reporter: Luís Alexandre <contribute.2f8md>
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: antti.savo, kdelibs-bugs-null, meven29
Priority: NOR    
Version First Reported In: 5.107.0   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Luís Alexandre 2023-08-31 14:08:54 UTC
I was trying to override the libreoffice templates that my distro provides with local ones that I modified (so they won't get overwritten on updates) but this doesn't seem to work. Also it seems that KDE detects that a template is the same by having the same URL field in the .desktop file. Which means if they have the same relative URL they'll be treated as the same template. A workaround for now is to remove libreoffice-plasma package so that there are no templates in /usr/share/templates
Comment 1 Antti Savolainen 2025-01-10 05:45:14 UTC
If the fix implemented here does not fit your expectations, please let us know.

*** This bug has been marked as a duplicate of bug 191632 ***
Comment 2 Méven Car 2025-01-19 11:06:53 UTC
Not a duplicate.

It seems our de-duplication of templates ( inverse the priority as you expect here.
The user ones seem listed after the system ones, 
https://invent.kde.org/frameworks/kio/-/merge_requests/1688/diffs#ab4c31cc35d63288acfb260ffe3d2e5617cc0716_1071_1078) consequently, you can't overwrite them.

Inverting the order of the templates when adding templates might be sufficient:
https://invent.kde.org/frameworks/kio/-/merge_requests/1688/diffs#ab4c31cc35d63288acfb260ffe3d2e5617cc0716_1043_1032