Download it now!
Bug 124644 - Template manager broken since version for Linux
Summary: Template manager broken since version for Linux
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) rc
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Template-Manager
  Show dependency treegraph
Reported: 2019-04-10 08:22 UTC by Roland Baudin
Modified: 2019-06-10 16:34 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

Writer test template (7.98 KB, application/vnd.oasis.opendocument.text-template)
2019-04-10 08:22 UTC, Roland Baudin
Error message when importing a template (38.33 KB, image/png)
2019-04-10 08:23 UTC, Roland Baudin

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Baudin 2019-04-10 08:22:47 UTC
Created attachment 150646 [details]
Writer test template

The Template manager doesn't work any more since version of LibreOffice for Linux.

Below is a simple test that tries to import in Writer some .ott template located in $HOME. The attached file should be imported in the user default template directory (in Linux, this is $HOME/.config/libreoffice/4/user/template).

Steps to reproduce:

1. Copy the attached file in $HOME

2. Delete or move the $HOME/.config/libreoffice directory to start with a fresh profile

3. Launch Writer

4. Click on File / New / Templates...

5. Click on Import. In the dialog window that shows up, there is a list of current template categories. However, *all sub-directories* of the current directory are listed, which is not normal: only the Template Categories names should be listed here

6. Select the 'My templates' category, then click OK and select the file '' located in the $HOME 
directory, then click Open and you should see an error message (see attached image)

7. Since there, Writer is freezed and its process has to be killed

A side effect of this bug (or the cause?): in Writer, if you try to open directly the file '', then Writer also freezes (without any error message).

I reported the bug specifically for Writer, but the same problems occur in Impress, Draw and Calc.

These bugs do not occur in Windows (tested with LO on Windows 7 64 bits).

My system: Ubuntu Linux 18.04.2, 64 bits
LO version, downloaded from
Comment 1 Roland Baudin 2019-04-10 08:23:25 UTC
Created attachment 150647 [details]
Error message when importing a template
Comment 2 Xisco Faulí 2019-04-16 07:27:04 UTC
Thank you for reporting the bug. To be certain the reported issue is not
related to corruption in the user profile, could you please reset your
Libreoffice profile ( ) and

I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the issue is still present
Comment 3 Roland Baudin 2019-04-16 08:36:55 UTC
I did the test with a fresh profile, see point 2 of the bug report.
Comment 4 Peter 2019-05-09 14:56:30 UTC
I can confirm this behavior on version

The upgrade to this version happend during the upgrade of Ubuntu from 18.10 to 19.04.

I am no longer abel to create templates or using (opening) any older templates regardsless whether I delete the ~/.config/libreoffice/4 profile directory or not.

In all cases the user interface of libreoffice hangs, the windows can only be closed by the WindowsManager (Close --> Popup LibreOffice not responding - Force Quit).

iotop shows now IO operations for libreoffice during hanging, top shows an activity of soffice.bin between 25 and 100 %CPU on one cpu.
Comment 5 Peter 2019-05-09 16:32:59 UTC
deinstalling all libreoffice components and reinstalling them will not change anything
Comment 6 Roland Baudin 2019-05-09 16:47:10 UTC
Perhaps comment 8 of bug report #124714 ( could help you with this issue...
Comment 7 Peter 2019-05-09 21:39:33 UTC
Hi Roland,

thanks for this hint - it fixes my problem too.

The big question is, what or who causes the entries in user-dirs.dirs ending with the "/"?


Comment 8 Roland Baudin 2019-05-10 06:48:13 UTC
I don't know but to me LO has to be fixed: a path like /bla/bla/bla/ should be converted to /bla/bla/bla before using it. The trailing slash has to be removed. This is safer and avoids many problems like the one we have.
Comment 9 Peter 2019-05-10 18:33:52 UTC
well, yes the behavior should be fixed in LO.

But when I have a look closer at the contents of user-dirs.dirs, it looks very much like this file was added later.
On my notebook 
XDG_TEMPLATE_DIR="$Home/Vorlagen"  the directory Vorlagen exists.
On my workstation
XDG_TEMPLATE_DIR="$Home/" there is no Vorlagen or Template directory.

Assuming that an OS-upgrade step adding the user-dirs.dirs file is propably also analysing the existing directory structure - it is not finding "Vorlagen" or "Templates" directory and therefor not adding the subdirectory to "$HOME/". Maybe it will be a good idea to create the subdirectory and add it to the end of XDG_TEMPLATE_DIR ...


Comment 10 Xisco Faulí 2019-06-10 15:11:44 UTC
Hello Roland, Peter,
Could you please try to reproduce it with the latest version of LibreOffice
from ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 11 Roland Baudin 2019-06-10 16:25:30 UTC
OK, I retested (using a fresh profile and with the trailing '/' in ~/.config/user-dirs.dirs):

LO => bug is there (as reported above)
LO => bug is not there

So, for me, the bug can be closed!
Comment 12 Xisco Faulí 2019-06-10 16:34:27 UTC
Hello Roland,
Thanks for retesting with the latest version.
Setting to RESOLVED WORKSFORME as the commit fixing this issue hasn't been identified.