Bug 96890

Summary: The file "groupuinames.xml" is invalid XML because of missing namespace binding
Product: LibreOffice Reporter: Regina Henschel <rb.henschel>
Component: LibreOfficeAssignee: melikeyurtoglu <aysemelikeyurtoglu>
Status: VERIFIED FIXED    
Severity: normal CC: h3734236, mentoring, serval2412
Priority: medium Keywords: difficultyBeginner, easyHack, skillScript
Version: 5.2.0.0.alpha0+   
Hardware: All   
OS: All   
URL: http://www.w3.org/TR/2006/REC-xml-names-20060816/
Whiteboard: target:5.2.0
Crash report or crash signature: Regression By:

Description Regina Henschel 2016-01-04 17:24:10 UTC
The file "groupuinames.xml" is written to the user/template directory, when a template has a ui-name different from the file name.
It looks for example like this:

<?xml version="1.0" encoding="UTF-8"?>
<groupuinames:template-group-list xmlns="http://openoffice.org/2006/groupuinames"><groupuinames:template-group groupuinames:name="rumprobier" groupuinames:default-ui-name="rumprobier2"/>
</groupuinames:template-group-list>

But is should be
<?xml version="1.0" encoding="UTF-8"?>
<groupuinames:template-group-list xmlns:groupuinames="http://openoffice.org/2006/groupuinames"><groupuinames:template-group groupuinames:name="rumprobier" groupuinames:default-ui-name="rumprobier2"/>
</groupuinames:template-group-list>

Notice the wrong 'xmlns=' in contrast to the correct 'xmlns:groupuinames='.
Comment 1 Regina Henschel 2016-01-04 17:49:35 UTC
Not "when a template has a ui-name different from the file name" but "when a folder has a ui-name different from the actual folder name".
Comment 2 Julien Nabet 2016-01-04 20:20:08 UTC
Code pointer:
http://opengrok.libreoffice.org/xref/core/sfx2/source/doc/doctemplateslocal.cxx#66

(If you got no time or if you're on another issue, I can quickly submit a patch to review)
Comment 3 Regina Henschel 2016-01-04 23:06:47 UTC
I suggest, make it an "easy hack". I'm currently on other issues.
Comment 4 Julien Nabet 2016-01-07 19:14:13 UTC
Let's easy hack it then.
Comment 5 chaitanya7991@gmail.com 2016-01-15 09:17:21 UTC
Hi 
  I am a beginner and I would like to take this as my first bug.I couldn't find the user/template dir. Could you please guide me through this?
Comment 6 Regina Henschel 2016-01-16 11:52:22 UTC
Start LibreOffice and call the Template Manager by Ctrl+Shift+N. Then click on "New Folder" and enter a name, "TestTemplates" for example. That will generate the folder "template". The position of the folder "user" depends on your OS and on the kind of LibreOffice (regular, dev, self-built). You can look up the path in Tools > Options > LibreOffice > Paths.
Comment 7 Robinson Tryon (qubit) 2016-02-18 14:51:35 UTC Comment hidden (obsolete)
Comment 8 Commit Notification 2016-05-01 10:07:07 UTC
melikeyurtoglu committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3962ae32d442b1a33d78a877690930fc45e990b0

tdf#96890 The file "groupuinames.xml" is invalid XML

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Markus Mohrhard 2016-05-06 14:43:55 UTC
Thanks Melike for the fix.
Comment 10 Commit Notification 2016-05-06 15:32:54 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ba178877324384b19709c0789f496ddf44c8556a

fix typo, related tdf#96890

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Daniƫl van Vuuren 2016-06-03 13:30:31 UTC
Verified fix in:

Version: 5.3.0.0.alpha0+
Build ID: 6b3b352b06d92ef20194b9a992a521af2ef07b48
CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; 
TinderBox: Linux-rpm_deb-x86@71-TDF, Branch:master, Time: 2016-06-03_01:35:48

Version: 5.2.0.0.beta1+
Build ID: b6230835b927e0053687fae6026fa3603600f321
CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; 
TinderBox: Linux-rpm_deb-x86@71-TDF, Branch:libreoffice-5-2, Time: 2016-06-03_02:09:38

Not fixed in:
Version: 5.1.5.0.0+
Build ID: 1245bead3a68c9495a870f194f3c523b3b78cf87
CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; 
TinderBox: Linux-rpm_deb-x86@71-TDF, Branch:libreoffice-5-1, Time: 2016-06-02_04:43:39