Bug 133253 - Error importing a template to the Template Manager should be explained
Summary: Error importing a template to the Template Manager should be explained
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: Template-Manager
  Show dependency treegraph
 
Reported: 2020-05-21 23:21 UTC by TorrAB
Modified: 2024-07-07 03:15 UTC (History)
3 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 TorrAB 2020-05-21 23:21:56 UTC
File>templates>Manage, click Import, choose a file; get warning: ‘Error importing the following templates…’ if the file exists already.
Cause should be explained, with option to overwrite: ‘File exists; overwrite?’.
(I hate software that says frustratingly ‘An error occurred.’)
Comment 1 Dieter 2020-05-25 11:17:29 UTC
I confirm it with

Version: 7.0.0.0.alpha1+ (x64)
Build ID: 0e5e935deb0527c64865cfcc53a0421e56b74b6f
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Additional information: Error only appears if target of import is the same category.


I think, it is more an enhancement than a bug.

cc: Desing-Team for decision about expected result.
Comment 2 Heiko Tietze 2020-05-25 11:31:51 UTC
While I agree on useful and actionable error messages, I doubt there is a simple solution. In sfx2/source/doc/templatedlg.cxx OnTemplateImportCategory() the error message shows-up in any case of errors (it's possible to multi-select files).
Comment 3 sdc.blanco 2021-01-02 17:16:33 UTC
(In reply to TorrAB from comment #0)
> File>templates>Manage, click Import, choose a file; get warning: ‘Error
> importing the following templates…’ if the file exists already.
Agree with request, but situation is slightly more complicated. 

You can import a file with same filename as an existing template, if Title is different (File>Properties - Description tab - Title) (imported filename has '1' appended to it)

Otoh, if imported file has same Title as existing template (with a different filename), then only one template is shown in Template Manager.

iow, an attempt to improve error-checking feedback will involve a different process than checking filenames...
Comment 4 sdc.blanco 2021-01-04 23:05:52 UTC
(In reply to sdc.blanco from comment #3)
> Otoh, if imported file has same Title as existing template (with a different
> filename), then only one template is shown in Template Manager.
Correction:  In this case, the title in the imported template file is removed, so that the filename becomes the template name.

If there is already a template with the same Title as the filename being imported, then you get a "cannot import" message  -- even if there is no filename with the same filename as the template to be imported.

The bottom line conclusion remains the same:

an attempt to improve error-checking feedback will involve a different
process than checking filenames...
Comment 5 sdc.blanco 2021-01-04 23:10:46 UTC
An alternative to error feedback would be "error correction"

As the examples in comment 3 and comment 4 show, Template Manager already makes "silent" correction actions in some cases.  

For the "error" cases, a simple repair would be to offer the opportunity to enter a new name for the template. 

afaict, if the same name/title does not exist in the selected category, then the template manager already knows how to handle the clash with filenames.

iow, with a "rename" function (instead of an error message), the need for giving "error" feedback messages could be completely eliminated -- because it would always be possible to successfully import templates.  

(after which, one could "rename", "delete", "move" templates within Template Manager as needed.)
Comment 6 QA Administrators 2024-07-07 03:15:31 UTC
Dear TorrAB,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug