[Libreoffice-bugs] [Bug 112235] New: FILESAVE Unable to save with lost linked image: Error in writing sub-document content.xml

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Sep 5 14:45:44 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=112235

            Bug ID: 112235
           Summary: FILESAVE Unable to save with lost linked image: Error
                    in writing sub-document content.xml
           Product: LibreOffice
           Version: 5.4.1.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: paddy at landau.ws

Description:
An old error appears to have resurfaced. Neither the solution nor the cause had
previously been found, but I have been lucky enough to at least find the cause,
to help track down a solution.

When a Writer document has a link to an image, but the image is no longer
present on disk, the document cannot be saved. If the image is restored to
file, the document can again be saved.

This problem occurs in 5.4.1, whereas 5.4.0 worked correctly. Thus, it is a
regression.

The following explanation shows how to reproduce it, and gives a workaround
(unfortunately unworkable for documents with many linked images). However,
because the error message is obscure for the non-technical user, it leaves the
user utterly helpless to proceed.

Steps to Reproduce:
1. Open a document with a linked image. If you don't have such a document,
create an image and then Insert > Image > select an image > Insert as Link (it
isn't necessary to save the new document).

2. Remove or rename the linked image from disk (but keep it in the document).

3. Try to save the document.

Actual Results:  
On trying to save the document, the following error message is displayed.

> saving the document Untitled 1:
> Write Error.
> Error in writing sub-document content.xml.

(Replace "Untitled 1" with your document's name, if it has been saved.)

You can save the document again by doing any one of the following.
• Restore the original image on disk.
• Right-click the image > Properties > Image > Link > File name > set the new
file name (assuming that the image file was merely renamed and not removed).
Note that you cannot use a new image to replace the old image; Writer requires
the original image.
• Delete the image from the document, and optionally replace it.

Expected Results:
What should happen is that the file is saved regardless. This allows the user
to reopen the file later and replace the missing image with a new one. (This is
a feature that I haved used frequently.)

If a large file with many linked images is copied to a new location but misses
some of the images, this bug renders the file unable to be saved without
deleting all of the linked images — this can be most undesirable.


Reproducible: Always

User Profile Reset: No

Additional Info:
In the following Ask LibreOffice question:
https://ask.libreoffice.org/en/question/90164/cannot-save-file-error-in-writing-sub-document-contentxml/
One answer said to check the following OpenOffice tutorial:
https://forum.openoffice.org/en/forum/viewtopic.php?f=71&t=87180
But XML Copy Editor does not report an error.

Related (closed) bug reports:
https://bugs.documentfoundation.org/show_bug.cgi?id=60769
https://bugs.documentfoundation.org/show_bug.cgi?id=109049

Tested with the following versions.

• 5.3.1.6 — works correctly
• 5.4.0.3 — works correctly
• 5.4.1.2 — fails

Operating system: Linux Ubuntu 16.04 64-bit


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/60.0.3112.113 Safari/537.36

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170905/bf6f47a2/attachment.html>


More information about the Libreoffice-bugs mailing list