<table><tr><td style="">aacid added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D8642" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
          color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D8642#166482" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">D8642#166482</a>, <a href="https://phabricator.kde.org/p/rkflx/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;" rel="noreferrer">@rkflx</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><ol class="remarkup-list" start="2">
<li class="remarkup-list-item">Got several "Lost annotation on document save, something went wrong" on the console. However, to prevent data loss this should show a warning in the UI and allow aborting (just show the warning dialog from below and amend the list appropriately). I'll try to add steps to reproduce as soon as I can (might be an annotation created elsewhere, i.e. already present in the document and thus should not be lost indeed).</li>
</ol></blockquote>

<p>Steps to reproduce:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Download and <span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Open</span></span></span> <a href="https://www.antennahouse.com/antenna1/wp-content/uploads/2015/07/axf-annotation-1.pdf" class="remarkup-link" target="_blank" rel="noreferrer">sample document</a>, add annotation, <span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Save</span></span></span>.</li>
<li class="remarkup-list-item">Observe warning on console ("Lost annotation on document save, something went wrong").</li>
<li class="remarkup-list-item"><span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Review</span></span></span> sidebar shows only multiple "Page 1" where before the annotations where listed correctly (they are still shown in the document, though).</li>
<li class="remarkup-list-item">Manual <span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Reload</span></span></span> restores all old annotations as well as the newly added one, <span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Review</span></span></span> sidebar no longer broken.
<br /><br />
Given no actual data was lost, I'd not consider this critical anymore. However, it is quite scary and should be fixed.
<br /><br />
The same behaviour can be seen when Okular opens <tt style="background: #ebebeb; font-size: 13px;">autotests/data/file1.pdf</tt> annotated on Android with "Adobe Acrobat" or "MuPDF".
<br /><br />
---
<br /><br />
Edit: To clarify, I assume this is fixable in the backend, no UI warning necessary as originally proposed.</li>
</ul></div>
</blockquote>

<p>Found the problem and fixed in the branch (still need to update the diff here)</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8642" rel="noreferrer">https://phabricator.kde.org/D8642</a></div></div><br /><div><strong>To: </strong>aacid, mlaurent<br /><strong>Cc: </strong>rkflx, lueck, mlaurent, michaelweghorn, ngraham, Okular, aacid<br /></div>