Bug 169431 - writer documents template path points to la-la land
Summary: writer documents template path points to la-la land
Status: RESOLVED DUPLICATE of bug 131392
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-14 01:42 UTC by craig.zk
Modified: 2025-12-25 17:00 UTC (History)
1 user (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 craig.zk 2025-11-14 01:42:49 UTC
Description:
Document of 90+ files created over ten years ago, brought along through numerous updates to Linux and Office (through it's various guises). A style changed somewhere along the way, edited the template and nothing happened. Properties say "Template: theManual". Looking at the .fodt file says "../../../Documents%20and%20Settings/Craig%20D/Application%20Data/OpenOffice.org2/user/template/theManual.ott", something that doesn't exist. The files have moved over the years so I don't even know where that path is relative to. The template now exists in a path Office knows about (I can edit it). Am I screwed?
I looked at the Template Changer extension but it leaves files as .fodt, not .odt and I'm not comfortable with it.
This is truly annoying as templates are such a basic part of a document.
That Properties doesn't show the full path to the template is ambiguous (yes, I do have multiple templates of the same name) and that it doesn't indicate it couldn't load said template seems lazy.

Steps to Reproduce:
1.Copy an (really) old, but current, writer document to a new version of writer.
2.
3.

Actual Results:
Editing what seems to be the template does nothing because that isn't the template. Properties gives no hint of the actual template or if it failed to load said template.

Expected Results:
An indication of an unexpected result and the opportunity to fix it.


Reproducible: Always


User Profile Reset: No

Additional Info:
Properties should show the full path (as in the fodt file), indicate successful loading of template and on failure a button to adjust that path. Actually, I want to always be able to change the template, it is called editing and writer is an editor. Yes, 90 files to change but at least I'd know what to change, as a neophyte writer user (who has read an old version of the manual), it was truly painful figure out what was broken.
Comment 1 craig.zk 2025-11-19 01:51:17 UTC
Please ignore my comments about the Template Changer extension, I was having a BDU moment, it works as described and as I had hoped.
Still, have to gyrate so much to find a solution grates.
BDU - Brain Dead User, a common bug report resolution at a former employer.
Comment 2 Krithika Yetchina 2025-12-09 18:32:54 UTC
Hey Craig, thank you for the followup and I'm glad it's working now. Sorry about the difficulty, though. Could you share a bit more about what you did to resolve it and what your solution was?
Comment 3 craig.zk 2025-12-09 20:04:06 UTC
It *is* working but verifying that it is, is indirect - I have to change the template, reload the file and, if I get a popup "template has changed", I know things are as they should me (or I save as "fodt" and look at the xml). Which is a bit tedious when updating zillions of files (90 in my case). Which is why I'd like something like the Properties to tell me the full template address and if loading it succeeded and a way to change it (while editing the document).

I have two working solutions: The "best"/easiest is the "Template Changer" extension, which works well but I can't tell what it actually put in the file (without looking at a fodt). I've settled on this solution. The other was to save to fodt, editing that and exporting back to odt. That way, I could hammer home that I want the template address as "../template.ott" rather than some absolute or relative to some template directory (which on my system seems to be "~/Templates", not where I want this template, I want it with the document so I can zip it to an archive and know I have all the pieces).
I use Writer infrequently enough that I'll forget to update a template location on a new install or system update (I need to add that to the README file for the document).
Comment 4 Krithika Yetchina 2025-12-09 20:55:20 UTC
Thank you, Craig. I am unable to reproduce this bug in 
Version: 25.8.3.2 (AARCH64)
Build ID: 8ca8d55c161d602844f5428fa4b58097424e324e
CPU threads: 11; OS: macOS 15.6.1; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

However, you've provided some great detail and your workaround so it can hopefully be escalated.
Comment 5 craig.zk 2025-12-10 05:09:43 UTC
This is really easy to duplicate:
1. In Writer, do whatever it is you do to create a document from a template. I don't know so I just used the template manager, opened zklManualTemplate made some changes and did a "save as"  templateTest.fodt.
2. Confirm properties shows the template. In my case "zklManualTemplate"
2. Open the templateTest.fodt in a text editor such as gedit, search for "template". I find xlink:href="ZKL/Doc/Manual/zklManualTemplate.ott"
3. Close and move templateTest.fodt to another directory.
4. Writer: manage templates, edit zklManualTemplate.ott. Make a zero change, save.
5. Open a file in the original document to verify you see the "update styles" dialog.
6. Open templateTest.fodt and notice you *DON'T* see the "update styles" dialog.

templateTest.fodt is now disconnected from the template. There is *NO* way for me to know that, Properties continues to say "Template: zklManualTemplate", the only way *I* know how is to look in the fodt and go "hmmm, that relative path no longer points to the template". Which is fine, it's on me that I moved the file and didn't use a sanctified location (although zklManualTemplate.ott *IS* in *a* Tools/Options/Paths/Templates path (not the default, jeez, can't you just search them all like $PATH does?). 

All I'm asking for is a heads up "yo, we couldn't find this template, want to change it?". Having Properties print the entire path in red with a suggestion to use the template change extension would be fine.
Comment 6 Buovjaga 2025-12-25 17:00:08 UTC
There is an older report about the same underlying issue and it had quite a bit of design discussions (no implementation yet, unfortunately), so I will close this as duplicate. I hope it's fine.

*** This bug has been marked as a duplicate of bug 131392 ***