Bug 131392 - Introduce option to "Save URLs relative to file system" for templates
Summary: Introduce option to "Save URLs relative to file system" for templates
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-17 23:01 UTC by John
Modified: 2020-08-03 08:07 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 John 2020-03-17 23:01:55 UTC
Description:
```
C:\Program Files\LibreOffice
%AppData%\LibreOffice\4\user\template\template.ott
C:\Users\John\Desktop\test.odt
```

4. Make changes in the template.

5. Move test.odt to another drive (I have two logical drives: C and D. Most of my non-system files are on D). Open it. There will be no prompt to update the styles. This is bad.

* * *

Most of the time we use "Save URLs relative to file system" option for linked images, which are typically located in the "images" directory "near" the document itself. This is convenient.

However, it shouldn't affect the linked template because such behavior makes zero sense for real work. At least, for most real-life use-cases.

Steps to Reproduce:
-

Actual Results:
-

Expected Results:
-


Reproducible: Always


User Profile Reset: Yes



Additional Info:
-
Comment 1 John 2020-03-17 23:05:14 UTC
SORRY. THE COMPLETE TEXT:

1. Disable: Tools > Options > Load/Save > General > Save URLs relative to file system.

2. It is assumed you have a template in Templates dir.

3. Create a document based on this template. Save it to Desktop. In my case, the locations looks as following:

```
C:\Program Files\LibreOffice
%AppData%\LibreOffice\4\user\template\template.ott
C:\Users\John\Desktop\test.odt
```

4. Make changes in the template.

5. Move test.odt to another drive (I have two logical drives: C and D. Most of my non-system files are on D). Open it. There will be no prompt to update the styles. This is bad.

* * *

Most of the time we use "Save URLs relative to file system" option for linked images, which are typically located in the "images" directory "near" the document itself. This is convenient.

However, it shouldn't affect the linked template because such behavior makes zero sense for real work. At least, for most real-life use-cases.
Comment 2 Buovjaga 2020-07-20 14:58:54 UTC
Adding UX team for comments as this would affect fundamental functionality.
Comment 3 Heiko Tietze 2020-07-21 10:30:35 UTC
The link is relative, see meta.xml xlink:href="../Test.ott". And while you sometimes move both document and template to another location it's also likely to just move the document.

We have many tickets regarding this functionality such as bug 61743, bug 86785, bug 104674 or bug 131619. And see also bug 111957.

To sum up, whatever solution we take it fails the other way. And as a user I'd expect the application to search for missing links like "Template Foo.ott not found. [Pick manually] [Search files] [Cancel]".

PS: Please consider to update. "Still" version is 6.3, "Fresh" v7 will be published soon. Though this will not affect the issue.
Comment 4 Heiko Tietze 2020-07-30 14:27:10 UTC
We discussed the request in the design meeting.

   + templates usually remain on the same place; there is Tools > Options > Load/Save >
     General > URLs relative to file system to switch between relative and 
     absolute path (Sascha)
   + sharing documents with other users requires relative path and templates at 
     a safe place (Sascha)
   + would be nice to show this setting (or be able to change on the fly) 
     while saving (Sascha)
   + decide whether relative or not per input of full path?
     + bad solution as barely discoverable (Heiko)
     + very uncommon as path is specified above (Krunoslav)
   + expert option, feedback not urgently needed (Patrick)


In a nutshell: You can change whether URLs are absolute or relative per Tools > Options > Load/Save > General. Admittedly there is no help (changing the component to ping the documentation team, but still WF).

https://help.libreoffice.org/6.4/en-US/text/shared/optionen/01020000.html?&DbPAR=WRITER&System=UNIX
Comment 5 Mike Kaganski 2020-07-30 14:28:02 UTC
I don't see a use case when a template should be searched relative to opened document. If it's edited locally, it's OK to use absolute path to the template (e.g., in user's profile); if passed to another user, it doesn't make sense to use relative addressing in this case, because likely the document will not be in the same position relative to that user's profile; is working on a shared project with shared templates, using absolute path to the shared template is also OK.

So what is the use case to have an option to save paths to templates relative? Sending files along with their templates? how important that use case is? i.e., why would in such a workflow edits to templates be necessary, which is the reason to find the templates relative to the documents?
Comment 6 Sascha Z 2020-07-30 21:33:39 UTC
> So what is the use case to have an option to save paths to templates
> relative? Sending files along with their templates? how important that use
> case is? i.e., why would in such a workflow edits to templates be necessary,
> which is the reason to find the templates relative to the documents?

The only use case for sharing templates with other users I can imagine is when several persons remotely work on the same document-set without sharing one remote folder. This use case might be small but can practical happen.

You sent a folder full of documents to a college or friend and include the templates within the folder for further editing.

Personally do I not mind this feature but I am sure the use case can happen.
Comment 7 Mike Kaganski 2020-07-30 22:03:15 UTC
(In reply to Sascha Z from comment #6)

So practically the decision was this:

We agree that for majority of practical uses of linked templates (with the exception of the same case that I and Sascha Z both described, and agreed that it should be not frequent, and even further, neither me nor Sascha Z use in practice, and only speculate about its possibility), the absolute paths are needed, and this need prevents users from using relative linking for all other useful reasons in their documents. Thus majority of users who rely on linked templates cannot presently use the relative linking in their documents, because that negatively affects their linked templates

Yet we close a bug that asks to change the linking of templates to absolute, on which grounds? that those users can configure their linking (as said, this way disabling themselves from using relative linking in their documents).

Have I missed something?

Current "resolution" makes 100% of users of linked templates unhappy. Both groups - the discussed majority, and the minority, both need to configure their linking according to the needs of templates, and then be unable to use the other way for other uses in document (like linked images); or use the linking mode needed for their contents (images), sacrificing the linked templates.

The proposal asked to make the major group happy allowing them to use linked templates, and independent mode for their images; while keeping minority unhappy.

The ideal solution could be a separate configuration, also discussed.

I honestly cannot see the reason of this "WF".
Comment 8 Heiko Tietze 2020-07-31 12:42:05 UTC
(In reply to Mike Kaganski from comment #7)
> I honestly cannot see the reason of this "WF".

One request versus many users complaining about regression once we changed the default. Feel free to reopen, if you think it should be done.
Comment 9 Mike Kaganski 2020-07-31 12:52:22 UTC
(In reply to Heiko Tietze from comment #8)
> One request versus many users complaining about regression **once we changed
> the default**.

I read that "changed the default", and start to suspect that there's some misunderstanding here - Heiko, do you see that the request is *not* about any defaults? The request is to make export of template path *independent* of the setting that you likely think about - i.e., the request is not to change the default value on Options->Load/Save->General, but to not use that setting (default value of which is not the topic here) for writing specific thing to file?
Comment 10 Heiko Tietze 2020-07-31 15:05:49 UTC
(In reply to Mike Kaganski from comment #9)
> The request is to make export of template path *independent*

That would improve the situation a bit. But still you have to go to T>O to change it.
Comment 11 Mike Kaganski 2020-07-31 15:15:32 UTC
(In reply to Heiko Tietze from comment #10)
> But still you have to go to T>O to change it.

Is "T>0" something everyone should know what it means?
Comment 12 Heiko Tietze 2020-07-31 15:26:47 UTC
(In reply to Mike Kaganski from comment #11)
> (In reply to Heiko Tietze from comment #10)
> > But still you have to go to T>O to change it.
> 
> Is "T>0" something everyone should know what it means?

Short for Tools > Options. Point is you have to go into the options dialog every time you want to change whether the template should use relative or absolute path. And the discussion was also to make this easier, which I still think is not a very common use case- so rather not. Nothing to say against individual settings for documents and templates. John, as the one who filed the enhancement request, would you benefit from this and also find the option?
Comment 13 Mike Kaganski 2020-07-31 15:32:27 UTC
(In reply to Heiko Tietze from comment #12)
> Short for Tools > Options. Point is you have to go into the options dialog
> every time you want to change whether the template should use relative or
> absolute path. And the discussion was also to make this easier, which I
> still think is not a very common use case- so rather not. Nothing to say
> against individual settings for documents and templates. John, as the one
> who filed the enhancement request, would you benefit from this and also find
> the option?

OMG. The ticket is to *remove* configurability from templates relativity, or to add a separate configure for it; OP had never told that configuration is too difficult; OP knew where to configure the existing functionality; the argument of OP was that relativity of templates in documents should not depend on relativity of other linked stuff.

It is some sport to discuss something unrelated, and close tickets on the grounds that people dislike that something unrelated?
Comment 14 Heiko Tietze 2020-08-03 08:07:54 UTC
Had a long discussion with Mike and he convinced me to reopen the ticket. Let's introduce another "URL relative" option for templates.