You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2015/04/01 19:13:19 UTC

[Issue 126219] New: invalid xml on saving document with comment/annotation

https://bz.apache.org/ooo/show_bug.cgi?id=126219

          Issue ID: 126219
        Issue Type: DEFECT
           Summary: invalid xml on saving document with comment/annotation
           Product: Writer
           Version: 4.1.1
          Hardware: All
                OS: All
            Status: CONFIRMED
          Severity: normal
          Priority: P5
         Component: ui
          Assignee: issues@openoffice.apache.org
          Reporter: jes@martnet.com

Steps to reproduce:
1) Open the attached Writer document
2) File > Save As (new name) OK
3) File > Reload ...
Read error. Format error (in content.xml)

The problem is here:

<style:style
  office:name="__Annotation__4738_53080995811111111111111"
 
office:name="__Annotation__4074_68698293611111111111111111111111111111111111111111111111111111111111111111111111"
  style:name="Table1" style:family="table">

This raises a validity error because the office:name attribute is repeated.
Removing one or both names will allow the document to load.

More interesting is that the name attributes are added to the style element:
they do not belong there at all, as far as I can see.

Perhaps this has something to do with the new annotation on text ranges
feature?

I've seen several (maybe a dozen) damaged documents like this through the OO
community forum but this is the first one that consistently generated the
problem on saving. So I'm hoping it will allow someone to debug the problem.

Since the damaged document was sent to me in confidence, I have obfuscated the
text of the document and removed all the embedded objects and images. The
modified document behaves exactly the same way as the original (same two
annotation IDs) so it should be useful for testing.

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126219] invalid xml on saving document with comment/annotation

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126219

brinzing <ol...@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126219] invalid xml on saving document with comment/annotation

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126219

--- Comment #5 from brinzing <ol...@gmx.de> ---
Created attachment 84630
  --> https://bz.apache.org/ooo/attachment.cgi?id=84630&action=edit
aoo411_open_save (error)

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126219] invalid xml on saving document with comment/annotation

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126219

John <jo...@yahoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |john.ha24@yahoo.co.uk

--- Comment #6 from John <jo...@yahoo.co.uk> ---
See the forum post "[Hint] How did I fix my ODT file" at
https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=1532.

The post includes many reports of corrupted XML files, as well as other forms
of data loss in faulty files.

Many uploaded .odt files have been analysed by forum members, and many have
been found where the XML tags in content.xml have somehow become corrupted. 
acknak has often been able to correct the XML errors manually, and thus recover
the file.  

For example, see
https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=1532&start=360#p357769
for a file which has currupted tags, and which refers to this Issue 126219, and
where acknak says:

> In case someone is wondering, here is the problem: an easy-to-fix problem in content.xml:
> extra attributes in a style definition:
> 
> <office:automatic-styles>
> <style:style office:name="__Annotation__10737_1353476854111"
>  office:name="__Annotation__5569_679014524111"
>  office:name="__Annotation__12292_187842290111" style:name="P1" style:family="paragraph"
>  style:parent-style-name="Standard">
> <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" 
>  fo:margin-top="0cm" fo:margin-bottom="0.199cm" .../>
> </style:style>
> 
> Just delete the office:name attributes (blue).

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126219] invalid xml on saving document with comment/annotation

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126219

--- Comment #1 from Joe Smith <je...@martnet.com> ---
Created attachment 84626
  --> https://bz.apache.org/ooo/attachment.cgi?id=84626&action=edit
Sample document generating error on save

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126219] invalid xml on saving document with comment/annotation

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126219

Marcus <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126219] invalid xml on saving document with comment/annotation

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126219

orcmid <or...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
                 CC|                            |orcmid@apache.org
             Status|CONFIRMED                   |RESOLVED

--- Comment #7 from orcmid <or...@apache.org> ---
Thanks for catching this.

I am marking this as a duplicate of Issue or 126479, although that is more
recent, since it provides more complete discussion and the same solution.

With regard "easy to fix" we need to ask "for whom" :).  I suppose a repair
tool would be handy for this case, if we had one of those to customize.

*** This issue has been marked as a duplicate of issue 126479 ***

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126219] invalid xml on saving document with comment/annotation

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126219

brinzing <ol...@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |oliver.brinzing@gmx.de

--- Comment #3 from brinzing <ol...@gmx.de> ---
it works if i save and reload the file with aoo401, but aoo411 and aoo412dev
will produce the error

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126219] invalid xml on saving document with comment/annotation

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126219

--- Comment #2 from Joe Smith <je...@martnet.com> ---
I'm testing with AOO 4.1.1 on Fedora Linux
OpenOffice 4.1.1  411m6(Build:9775)

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126219] invalid xml on saving document with comment/annotation

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126219

Kay <ks...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kschenk@apache.org

-- 
You are receiving this mail because:
You are the assignee for the issue.

[Issue 126219] invalid xml on saving document with comment/annotation

Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=126219

--- Comment #4 from brinzing <ol...@gmx.de> ---
Created attachment 84629
  --> https://bz.apache.org/ooo/attachment.cgi?id=84629&action=edit
aoo401_open_save (ok)

-- 
You are receiving this mail because:
You are the assignee for the issue.