Bug 93043 - Template files (OTT) in config directory are ignored if there is a ODT file with same name
Summary: Template files (OTT) in config directory are ignored if there is a ODT file w...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, needsDevEval, regression
Depends on:
Blocks: Templates
  Show dependency treegraph
 
Reported: 2015-07-31 05:43 UTC by Michael Fiedler
Modified: 2020-12-15 13:58 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
template directory containing two templates for reproducing the bug (94.96 KB, application/x-zip-compressed)
2015-07-31 05:43 UTC, Michael Fiedler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Fiedler 2015-07-31 05:43:46 UTC
Created attachment 117552 [details]
template directory containing two templates for reproducing the bug

Steps to reproduce:

1. Go to subdirectory "4/user" the user's LibreOffice configuration directory (Linux: ~/.config/libreoffice/4/user)
2. Unzip the attached file creating the user's "template" directory containing two OTT templates and ODT documents of the same name:

    template/
    |-- Brief_Arial.odt
    |-- Brief_Arial.ott
    |-- Brief_Latin_Modern_Roman.odt
    `-- Brief_Latin_Modern_Roman.ott

3. Open LibreOffice and go to "My templates" in the template manager


Expected behaviour:

There are now two templates "Privatbrief Arial" and "Privatbrief Latin Modern Roman".


Actual behaviour:

There is only one template "Privatbrief Arial"


Workaround:

Delete or rename the ODT file corresponding to the ignored OTT file and restart LibreOffice.  Now, both templates appear in "My templates".


Note that for the other OTT template Brief_Arial.ott, the ODT file with the same name did not influence the appearance of the template.  I could also reproduce this with a collection of 5 files, 2 did appear, 3 did not, so it does not depend on the number of template files in the directory.
Comment 1 Michael Fiedler 2015-07-31 05:46:15 UTC
LibreOffice 3.5.4.2 (from Debian Linux) is not affected.
Comment 2 Michael Fiedler 2015-08-01 10:29:12 UTC
LibreOffice 4.2.8.2 from Ubuntu 14.04 is also affected.

However, here, no template is listed in the templates manager and renaming the ODT file does not help (only deleting).
Comment 3 Joel Madero 2015-08-01 16:18:32 UTC
Confirmed:

Ubuntu 15.04 x64
LibreOffice 4.4.4.2

Setting to:
New - confirmed;
Minor - can slow down professional quality work but will not prevent it (just don't save odt files in the template folder....but I guess this can confuse people);
Low - default


Requesting a bibisect for this as user says it's a regression.

@Michael Fiedler - thanks for the report! If you ever have some free time and want to get more involved, feel free to come say hello in our chat: http://webchat.freenode.net/?channels=libreoffice-qa
Comment 4 Matthew Francis 2015-08-17 05:25:33 UTC
I can't reproduce this using the instructions in comment 0 on any version including 4.2.8.2.

(If you see no templates at all on 4.2.8.2, possibly it's not using the config directory you think it is? This can easily be checked by importing any single file with some distinguishable name as a template, then looking for it in the directory)

On current master I get an error for two of the files if I attempt to import all four as templates at once from within LO rather than just placing them directly into the templates directory. Immediately afterwards only one of the two templates is visible, but both templates do show up if I restart LO.
This is an issue, but not exactly the same as the original report.


@jmadero: Do you really see only one template? The issue reported isn't that the .odt files aren't visible, but that one of the two templates is missing altogether - if so, there's some other factor preventing this from being reliably reproduced
Comment 5 Joel Madero 2015-08-17 05:49:26 UTC
Nope the problem is as described. I can't see the template if there is a corresponding odt - as soon as I delete the odt (with no other change) the template becomes visible in the template manager.
Comment 6 Robinson Tryon (qubit) 2015-12-14 05:32:34 UTC Comment hidden (obsolete)
Comment 7 Joel Madero 2015-12-20 16:21:04 UTC
Looks like this was introduced around 4.1. Bibisect below:
 868359ac2b3f51e2249ca85637f687499c0e1109 is the first bad commit
commit 868359ac2b3f51e2249ca85637f687499c0e1109
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Wed Oct 16 02:33:24 2013 +0000

    source-hash-f340cbb6af86c7046d34202d2781a68b0d991001
    
    commit f340cbb6af86c7046d34202d2781a68b0d991001
    Author:     Tor Lillqvist <tlillqvist@suse.com>
    AuthorDate: Thu Jan 10 15:13:49 2013 +0200
    Commit:     Tor Lillqvist <tlillqvist@suse.com>
    CommitDate: Thu Jan 10 15:13:49 2013 +0200
    
        De-tab
    
        Change-Id: If0e93181affadd7c608625c494daf6da78ba9bbc

:100644 100644 8f49301d82652594c549e4fe479c79e0556c2ac7 4f3627f5907b97ff0ed828eef7528a7fc2ea08ef M	autogen.log
:100644 100644 53189d9b41b25f4ff7af9c3988b5c00e0c320fae e92d710bc25bc22f84e55e154f06cb98cee561d1 M	ccache.log
:100644 100644 f403c38efd33a5e3ba5f8c40d40de1c5669bedce 6fd8bb4d985c6b4f6bfab365fe328c3482fa74cb M	commitmsg
:100644 100644 946187a09d2c1f5780d06494a4f35bcfc1c0f31a c412904f68797da36369e223eea958345eae065d M	dev-install.log
:100644 100644 9e29c577fe2b7a591a949771610796e5367e6368 f308744786e2f88dc97507b6b9f2fbb3cd42363d M	make.log
:040000 040000 32968362d6b686b80d8816909c00da933f0d6ed1 2225796a4e53ca5ee7abff22ca95345626c46b97 M	opt


# bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# bad: [e02439a3d6297a1f5334fa558ddec5ef4212c574] source-hash-6b8393474974d2af7a2cb3c47b3d5c081b550bdb
git bisect bad e02439a3d6297a1f5334fa558ddec5ef4212c574
# good: [8f4aeaad2f65d656328a451154142bb82efa4327] source-hash-1885266f274575327cdeee9852945a3e91f32f15
git bisect good 8f4aeaad2f65d656328a451154142bb82efa4327
# bad: [9995fae0d8a24ce31bcb5e9cd0459b69cfbf7a02] source-hash-8600bc24bbc9029e92bea6102bff2921bc10b33e
git bisect bad 9995fae0d8a24ce31bcb5e9cd0459b69cfbf7a02
# good: [51b63dca7427db64929ae1885d7cf1cc7eb0ba28] source-hash-806d18ae7b8c241fe90e49d3d370306769c50a10
git bisect good 51b63dca7427db64929ae1885d7cf1cc7eb0ba28
# good: [d65a58c31c8da044ef66ae4517fa2fe74cec0019] source-hash-2e053cf5ea4d93a2e1845e795a9c7fe1e08c84af
git bisect good d65a58c31c8da044ef66ae4517fa2fe74cec0019
# good: [00f5ea8ff23485332a8009f8017ae95cd5f83fa4] source-hash-4ef5ed9d21de767ce1b4c70d73cf15994b38dcdb
git bisect good 00f5ea8ff23485332a8009f8017ae95cd5f83fa4
# good: [b9da5d7ef8baf81aa867fc44cb6d8ebb6036201b] source-hash-ec376c2934e77fd1b56da892cfe2c1393f4c8156
git bisect good b9da5d7ef8baf81aa867fc44cb6d8ebb6036201b
# bad: [2432222b43bc847d69313b670fb66f5481c6510e] source-hash-194ba3a2cacbb5438dfcb8fb35167055e01ca251
git bisect bad 2432222b43bc847d69313b670fb66f5481c6510e
# bad: [868359ac2b3f51e2249ca85637f687499c0e1109] source-hash-f340cbb6af86c7046d34202d2781a68b0d991001
git bisect bad 868359ac2b3f51e2249ca85637f687499c0e1109
# good: [14986294151c475338ee0d34eb77a6a0673bb8d2] source-hash-7e2b1e9218b194ba244dfa23089ec30fd978f3de
git bisect good 14986294151c475338ee0d34eb77a6a0673bb8d2
# first bad commit: [868359ac2b3f51e2249ca85637f687499c0e1109] source-hash-f340cbb6af86c7046d34202d2781a68b0d991001
Comment 9 QA Administrators 2018-09-15 03:09:25 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2020-09-15 03:59:10 UTC Comment hidden (obsolete)
Comment 11 sdc.blanco 2020-12-15 13:58:28 UTC
Could not reproduce.

Copy all four files (in attachment) to relevant "My Templates" directory.

Both .ott templates (  "Privatbrief Arial" and "Privatbrief Latin Modern Roman" ) are shown as Expected.

Tested with:

Version: 6.3.6.2 (x64)
Build ID: 2196df99b074d8a661f4036fca8fa0cbfa33a497
CPU threads: 8; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: fr-BE (en_DK); UI-Language: en-US
Calc: threaded

and

Version: 7.2.0.0.alpha0+ (x64)
Build ID: 368c56144aab5794c39d5bc2082d9b3d6d7cebdb
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_DK); UI: en-US
Calc: threaded


Template Manager reworked in 2016 

Closing as WFM