nextcloud / nextcloud/documentserver_community
Version 0.3.4 saves almost as expected – but the last change is missing - sometimes.
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 142
- Forks
- 32
- Avg merge
- 23h 13m
- Merged PRs (30d)
- 15
Description
Documentserver Version 0.3.4 from:
git clone https://github.com/nextcloud/documentserver_community.git git checkout master make
This version saves almost as expected—but the last change is missing - sometimes.
-
Create a new document (at the local storage location):
+New > new spreadsheet > docserver-0.3.4-test.xlsx -
Spreadsheet opens blank (empty file saved to disk)
-
Check editing mode: Collaboration > set to "Fast"
-
Enter data into the first field (Cell A1, content "A1")
-
Exit the first field > Autosave occurs (as indicated by the GUI)
-
Check file in external viewer: Field content was actually saved to the file
-
Enter data into another field (Cell A3, content "A3")
-
Exit the field > Autosave occurs (as indicated by the GUI)
-
Check file in external viewer: Field content (A3) was NOT saved to the file
-
Tab is closed > Autosave activity outside the editor GUI can no longer be tracked.
-
Check file in external viewer: Field content (A3) was NOT saved to the file.
Since the last autosave took place in step 8 (but was not written to the file) and no further changes were made in the editor subsequently, presumably no further autosave occurred containing the field content last displayed in the editor. -
File is reopened in the editor from the disk:
The field (A3) last displayed in the editor is now gone. While the file content on the disk and the content in the editor are (seem to be!) synchronized, they do not match what the user last saw in the editor. -
Enter data into another field (cell A4, content A4)
-
Exit the field > Autosave occurs (as indicated by the GUI)
-
Check the file in an external viewer: field content A4 was indeed saved to the file
-
Enter data into yet another field (cell A7, content A7)
-
Exit the field > Autosave occurs (as indicated by the GUI)
-
Check the file in an external viewer: field content A7 was indeed saved to the file
Up to this point, one might think everything is working as expected—aside from the error where A3 wasn't saved initially.
But things get really strange from this point on:
- Enter data into yet another field (cell D1, content D1)
- Exit the field > Autosave occurs (as indicated by the GUI)
The editor still displays: A1, A4, A7, D1 (but not A3) - Check the file in an external viewer; it now displays:
A1, A3 (A3 is back!)
So, in step 21, the state on the file system matches what would have been expected at step 7/8: A1, A3
Even though, back in step 17, the state on the file system was completely different: A1, A4, A7, D1
We have a clear discrepancy here: which version would another user see in the GUI? The one from the file system or the one from the still-open editor? Before trying that, I’ll do a bit more testing in the open editor:
- Enter data into yet another field (cell D4, content D4)
- Exit the field > Autosave occurs (as indicated by the GUI)
The viewer now displays: A1, A4, A7, D1, D4 (no longer A3)
So, with this last autosave (step 23), the version currently displayed in the editor was saved again.
24. Enter data into another new field (cell D7, content D7)
25. Exit the field > Autosave occurs (as indicated by the GUI)
The viewer now displays: A1, A4, A7, D1, D4
So, the content of the last change (D7) is missing again. It likely won't be saved automatically upon closing either (since it wasn't in step 10).
Try the following instead:
26. Enter data into another new field (cell E1, content E1)—essentially as a "dummy"—to trigger another save (at least for D7).
27. Exit the field > Autosave occurs (as indicated by the GUI)
The viewer now displays: A1, A4, A7, D1, D4, D7 AND E1 (but A3 seems to be completely gone)
-
Enter data into another new field (cell A10, content A10)
-
Exit the field > Autosave occurs (as indicated by the GUI)
The viewer now displays: A1, A4, A7, D1, D4, A10 -
Enter data into another new field (cell D10, content D10)
-
Exit the field > Autosave occurs (as indicated by the GUI)
The viewer now displays: A1, A4, A7, D1, D4, A10, D10
From this point on, things are correct again—but that doesn't last.
I close the tab and reopen the file: the state is correct.
Proceed with field A13 > it ends up in the file
Proceed with field D13 > it does NOT end up in the file
Close the file with the discrepancy:
Editor shows D13, but the viewer (file) does not show D13
Even after closing, the situation remains the same; no D13 in the file.
That's all for now. The test described here does not yet demonstrate the consequences to be expected during simultaneous editing. Users joining the session might potentially open and see different versions of the data.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the numbered spreadsheet editing sequence in documentserver version 0.3.4, comparing the editor with the file in an external viewer after each autosave. Trace why the latest edit is intermittently absent or an older state reappears; done means successive edits persist to disk and reopening shows the same current content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100