Bug 167388 - When I edit the default template, the default save path changes to "Template" folder in my user directory instead of the path I had set
Summary: When I edit the default template, the default save path changes to "Template"...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, possibleRegression
: 167722 167845 (view as bug list)
Depends on:
Blocks: Options-Dialog-Paths
  Show dependency treegraph
 
Reported: 2025-07-05 14:51 UTC by NarayanAras
Modified: 2025-08-16 04:33 UTC (History)
4 users (show)

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 NarayanAras 2025-07-05 14:51:51 UTC
When I save a new file, Writer always saves the file in-
C:\Users\<userName>\AppData\Roaming\LibreOfficeDev\4\user\template

...instead of the default path I have set for My Documents (D:\Downloads).

I have to change the path for saving each new file.

I have been using the master daily builds for a very long time. I download a new master almost every month. 

The default path used to work in earlier versions without any issue.
Comment 2 NarayanAras 2025-07-06 09:56:11 UTC
(In reply to m_a_riosv from comment #1)
> https://help.libreoffice.org/26.2/en-US/text/shared/guide/workfolder.
> html?&DbPAR=WRITER&System=WIN

Thanks for the link. 
I know this, and set the path correctly to D:\Downloads.

But Writer ignores that.
Comment 3 NarayanAras 2025-07-06 10:02:05 UTC
I started LibreOffice in Safe mode, and then checked the path.
Strangely, all paths have "onedrive" in them.
I changed it to D:\Downloads.
Then I created a dummy file for trial, and then saved it.
It also ignores the Path I had just set, and goes back to original path.
Comment 4 NarayanAras 2025-07-13 12:24:40 UTC
I uninstalled LibreOffice completely using BCUninstaller, and wiped all leftover components. I deleted the installation folder.

Then I restarted the laptop.

Then I downloaded the latest alpha LibreOffice, and installed it in a new folder.
(Path: C:\Program Files\Util\libreOfficeDev 26).

Then I started the LO, and saved a new document, it offered me this path:
C:\Users\<userName>\AppData\Roaming\LibreOfficeDev\4\user\template  <== REF1

I did not want this path.

I opened the Options > LibreOfficeDev > Paths screen.
It shows this path:
C:\Users\<UserName>\OneDrive\Documents <== REF2

It should have been same as REF1.

Anyhow, I changed this path to D:\Download <== REF3

Now if I save any new document, it should be saved in this path.
But it shows me the path in REF1! 
--------------------------------------------------------------

After installation, I had changed the Default template.
At that time, the original default template showed locked, and it allowed me to save only a copy. So I named the edited template as "MyDefault" and saved it in "My templates" group.

Then I checked the "set as default" check box.

However, I do not expect that to influence the default folder for *.dot files!
Comment 5 NarayanAras 2025-07-14 19:56:08 UTC
I found a way to reproduce the bug:

Note that my default save path was D:\Downloads at the beginning, before the following experiment began.

1. Press CTRL+SHFT+N 
2. Right-click on the Default template, and select Edit.
3. LO tells you that another (unknown) user has locked the file, and allows you to open a copy. [BUG#1]
4. Edit the file (I typically set narrower margins and A4 paper size)
5. File > Templates >Save as template
6. Name the new template as "MyTemplate" in "Styles" category.
7. Select the "Select as default" checkbox.
8. Press OK.
--------------
9. launch a new file (CTRL+N)
10. Press CTRL+S (you need not edit it, as all we are doing is to check the save path).
LO shows"C:\Users\<userName>\AppData\Roaming\LibreOfficeDev\4\user\template" path.
[BUG#2]
--------------
11. Abort. Quit the file.
12. Press CTRL+SHFT+N.
13. Right-click on the newly created template, and select "Reset Default".
14. Press OK.
---------------
15. Now create a new file in Writer (CTRL+N.
16. Press CTRL+S.
LO shows the correct path (D:\Downloads).

Conclusion: As long as I use a different template, my default path changes to the Template folder. If I reset the template to default, Writer saves in my default path. [BUG]
Comment 6 Saburo 2025-07-24 07:37:58 UTC
bibisected with win64-25.8
commit 5683376d063569368bd7d3036ec6ce725134bb08
author	Samuel Mehrbrodt

tdf#165392 Save as should default to current document directory as well

adding to CC:Samuel Mehrbrodt
Please, take a look?
The template folder is where new documents created using the template will be saved.
Comment 7 nobu 2025-07-29 20:22:42 UTC
*** Bug 167722 has been marked as a duplicate of this bug. ***
Comment 8 nobu 2025-08-07 19:56:06 UTC
*** Bug 167845 has been marked as a duplicate of this bug. ***
Comment 9 nobu 2025-08-07 20:01:38 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a4349c502eb2169b3f83d58e49a7871a341daf76

tdf#167845 Don't preselect the template path

It will be available in 26.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 10 NarayanAras 2025-08-16 04:31:43 UTC
Daily builds have stopped for many weeks/months!

https://dev-builds.libreoffice.org/daily/master/current.html

It just reports "no build available" for Windows 64.
(I am using Win 11, 64 bit)
Comment 11 NarayanAras 2025-08-16 04:33:49 UTC
This page shows 404 no content:
https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb77-TDF/current