Download it now!
Bug 85458 - Missing Message that Template Can not be Saved due to Missing Access Rights
Summary: Missing Message that Template Can not be Saved due to Missing Access Rights
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.3.1.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Template-Manager
  Show dependency treegraph
 
Reported: 2014-10-25 21:51 UTC by Harald Koester
Modified: 2019-05-09 15:07 UTC (History)
6 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 Harald Koester 2014-10-25 21:51:09 UTC
In order to reproduce do:

[1] Start LibreOffice and open Options dialogue.
[2] Go to “LibreOffice > Paths” and add a read-only folder to the Templates paths. (E. g. you can use any program folder, which only can be modified with administration rights. Of course in this case you should not be the administrator.) 
[3] Mark the added folder as default path for new files.
[4] Close the Options dialogue with OK.
[5] Create new Writer document and insert some text.
[6] Save this document as template: 
(a) “File > Templates > Save as template...”.
(b) Choose “My Templates”.
(c) Click “Save”.
(d) Insert any template name, then OK. The template manager is closed. Hence it seems that the template has been saved.
[7] Try to create a new text document with the new template: File > New > Templates. The template manager opens but the template “saved” at step 6d is not displayed and hence has not been saved.

Expected behaviour: At step 6d a message should be displayed, that the template can not be saved due to missing access rights.

It took me some time to understand why I was not able to save a template, because first it was not obvious why this function does not work. I did not remember, why and when I marked a read-only folder as default path for new templates. So it was a bit annoying. 

Generally there is a risk of data loss, if a user who creates a template trusts in the save function and then closes the document without saving.
Comment 1 V Stuart Foote 2014-10-27 02:47:03 UTC
On Windows 7 sp1, 64-bit en-US with
Version: 4.4.0.0.alpha1+
Build ID: 04ea7b24ec1b5a027efa0b850f2bc3ac7116c52e
TinderBox: Win-x86@39, Branch:master, Time: 2014-10-25_08:36:56

Confirming behavior, if user has no write/modify access to the directory selected active in Tools -> Options -> Paths: Templates to save the template--the Save as dialog does not alert to that fact. And the dialog then closes without actually saving a copy of the template to any location.

A bit of a corner case as defaults are into the user's profile. But would be reasonable enhancement to incorporate a write/modify test of the template save as dialog and alert to lack of write/modify permission for location selected.
Comment 2 QA Administrators 2015-12-20 16:13:47 UTC Comment hidden (obsolete)
Comment 3 Harald Koester 2015-12-30 22:17:26 UTC
Bug still exist in version 5.0.4.
Comment 4 Harald Koester 2016-11-01 13:03:02 UTC
Bug checked again with version 5.2.2 with Win7. 

With the new template manager the function is a bit different. But now you get the error message "Cannot save template: [template name]" if you try to save the template to a folder which is read-only. Hence the bug is almost fixed, only the reason why the template can't be saved, should be displayed in addition.
Comment 5 Yousuf Philips (jay) (retired) 2016-11-22 11:50:48 UTC
(In reply to Harald Koester from comment #4)
> With the new template manager the function is a bit different. But now you
> get the error message "Cannot save template: [template name]" if you try to
> save the template to a folder which is read-only. Hence the bug is almost
> fixed, only the reason why the template can't be saved, should be displayed
> in addition.

As there could be multiple reasons why a template couldnt be saved in a particular folder/category, the current error message is sufficient to inform the user that the template wasnt saved. So WFM.

@Heiko, @Samuel: Whats your take?
Comment 6 Heiko Tietze 2016-11-22 12:05:27 UTC
(In reply to Yousuf Philips (jay) from comment #5)
> (In reply to Harald Koester from comment #4)
> > ...only the reason why the template can't be saved, should be displayed
> > in addition.
> 
> As there could be multiple reasons why a template couldnt be saved in a
> particular folder/category, the current error message is sufficient to
> inform the user that the template wasnt saved. So WFM.

I agree with Harald, "can't be saved" is not actionable. And I wonder what multiple reasons you have in mind. Write access, disc full... no idea what else. But if the OS returns a result code it shouldn't be too much effort to get the error string for this code.
Comment 7 Samuel Mehrbrodt (CIB) 2016-11-22 12:23:34 UTC
Agree with Heiko that we should provide more details, I think it might be common that companys put templates in a read-only folder.
Comment 8 Yousuf Philips (jay) (retired) 2016-11-22 12:25:10 UTC
(In reply to Heiko Tietze from comment #6)
> I agree with Harald, "can't be saved" is not actionable. And I wonder what
> multiple reasons you have in mind. Write access, disc full... no idea what
> else. But if the OS returns a result code it shouldn't be too much effort to
> get the error string for this code.

Attempt saving a document from the file save dialog into a folder that you dont have access to (e.g. /bin/) and the error that appears simply states "Error saving the document [doc_name]: /bin/[doc_name] does not exist."

Some other reasons why a template might not be saveable, folder no longer exists and folder no longer accessible (e.g. unplugging a usb).
Comment 9 Harald Koester 2017-02-14 14:50:48 UTC
I see the following cases that should be considered for error messages while saving templates:
(1) No access rights to the template folder.
(2) Template folder does not exist.
(3) Drive does not exist / is not available. (e.g. unplugged usb device)
(4) File already exists.
(5) Disc full.

I would expect the following:
(1) Error message with display of reason.
(2) LibreOffice should create folder. I think this is already implemented.
(3) Error message with display of reason.
(4) Error message with display of reason. (partly implemented, see bug 105999)
(5) Error message with display of reason.

So there are 4 different error messages that should be implemented. I think this would help a user a lot in case of problems while saving templates. Otherwise in case of only one message it's more a guessing game for a user, what's happened.
Comment 10 QA Administrators 2018-04-30 02:32:15 UTC Comment hidden (obsolete)
Comment 11 Harald Koester 2018-05-01 17:34:28 UTC
A differentiation of the reason for a failing of saving a template is still not implemented. See comment 9.  (Version 6.0.3, 64 bit, Win7)
Comment 12 QA Administrators 2019-05-02 02:48:11 UTC Comment hidden (obsolete)
Comment 13 Harald Koester 2019-05-09 15:07:58 UTC
A differentiation of the reason for a failing of saving a template is still not implemented. See comment 9.  (Version 6.2.3, 64 bit, Win10)