Bug 159663 - Update of LO always rewrites the Registry entry in Windows pointing to default template
Summary: Update of LO always rewrites the Registry entry in Windows pointing to defaul...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-09 16:07 UTC by Orwel
Modified: 2024-02-12 14:39 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Orwel 2024-02-09 16:07:34 UTC
Description:
If you create your own template in Writer and put it somewhere other than the default path (C:\Program Files\LibreOffice\share\template\shellnew\soffice.odt) and make it the default to use for creating a new text document directly from Win Explorer (Right click - New - Text document), you need to change the value of the registry key Computer\HKEY_CLASSES_ROOT\.odt\LibreOffice.WriterDocument.1\ShellNew - FileName. There are 2 problems:
1. I think LO should make the registry change, not the user,
2. Although if you make this registry change, after each upgrade of LO the registry key is rewritten to the default pat C:\Program Files\LibreOffice\share\template\shellnew\soffice.odt, causing you not to use your default template for creating a blank document in Win Explorer.

Steps to Reproduce:
1. Create your own template in Writer, saved outside the default directory (which is (C:\Program Files\LibreOffice\share\template\shellnew\soffice.odt)
2. Make it default
3. Check the registry value FileName in Computer\HKEY_CLASSES_ROOT\.odt\LibreOffice.WriterDocument.1\ShellNew - the default path is kept. Try to create a new document in WinExplorer (Right click - New - Text document) 
3a. Change the path in Filename to the stored default template you have created in Step 1. Now
3b. Update LO or run the same installation by using Repair function.

Actual Results:
Ad 3/ it will not be created from the new (own) default template located in different directory than the default one.
Ad 3b/ original FileName value in registry key rewrites your own default template path, youa have changed.

Expected Results:
Ad 3/- should be created from the new (own) default template.
Ad 3b/ she changed path of your default template should be kept. 


Reproducible: Always


User Profile Reset: No

Additional Info:
This was marked in Bug 139962 as resolved, but is not.
Comment 1 Mike Kaganski 2024-02-09 16:20:26 UTC
This is not a bug. Indeed, the program rectifies its per-machine registry settings on setup.

However, what is the reason for changing the path in registry? bug 139991 and bug 139962 were resolved to make sure that LibreOffice's default templates there use the default template that you configure *inside* LibreOffice. So - just create a proper template (say, an OTT) in LibreOffice; set it there as default; and use the normal automatically configured Shell/New.
Comment 2 Orwel 2024-02-09 17:51:05 UTC
The own created template is not used if you create a new document in Windows Explorer as described, as it opens the default one because of the registry entry. What are you describing works, if you open a new document within LO (File/New). But I always create a document through Windows Explorer, as it is much easier to find the correct path (I can use other programs to navigate easily there).
I have templates for all my programs in specific directory different from C:\Program Files\LibreOffice\share\template\shellnew to be sure, not to be overwritten.
Comment 3 Mike Kaganski 2024-02-09 18:27:24 UTC
(In reply to Orwel from comment #2)
> The own created template is not used if you create a new document in Windows
> Explorer as described, as it opens the default one because of the registry
> entry. What are you describing works, if you open a new document within LO
> (File/New).

I'm afraid you are wrong, and you likely didn't read / understand the links.

The fixes that I referred to did exactly this:

1. The omitted bug 123476 made sure that, when you try to open a *zero-byte* file named "foo.odt", then LibreOffice does not try to check its content (which is none), and instead, only uses the extension (ODT) to define which file it is;
2. Bug 139991 made these files to use the default template configured in LibreOffice;
3. Bug 139962 converted the LibreOffice own "template" files for the Shell/New functionality to be these 0-byte.

I made a test just now, that it indeed works *exactly using Explorer's New menu*. Yes it does work. If it doesn't for you, this is the problem that needs resolving. But this your bug is NOTABUG, and won't be implemented.
Comment 4 Orwel 2024-02-12 14:39:22 UTC
Thank you, Mike, for further info. Depend on it I made an investigation on my side and found out, that resetting the default template in Writer/File/templates/manage and redefining my own template as default again solved the problem. I do not know, what was wrong, but know it works as you describe.
I close the bug.
I appreciate your help.