Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text is doubled after opening a page in collectives #1270

Closed
punkyard opened this issue May 17, 2024 · 23 comments · Fixed by nextcloud/text#5887
Closed

Text is doubled after opening a page in collectives #1270

punkyard opened this issue May 17, 2024 · 23 comments · Fixed by nextcloud/text#5887
Assignees
Labels
bug Something isn't working needs info

Comments

@punkyard
Copy link

Describe the bug
When we us collectives (team with mac, win, linux and different browsers or MD editors), we can find the text doubled! If I wrote 2 paragraphs the previous time, I see four.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Collectives
  2. Click on a page and 'edit'
  3. When edit is clicked, the text is doubled

Expected behavior
no changes made to the document

Screenshots

collectives-doubled

Server details:

  • Collectives app version: latest
  • Nextcloud version: 28.1 AiO 8

Browser log

attachments:1 
        
        
       Failed to load resource: the server responded with a status of 403 ()
attachments:1 
        
        
       Failed to load resource: the server responded with a status of 403 ()
/apps/text/session/71710/sync:1 
        
        
       Failed to load resource: the server responded with a status of 403 ()
sync:1 
        
        
       Failed to load resource: the server responded with a status of 403 ()
attachments:1 
        
        
       Failed to load resource: the server responded with a status of 403 ()
/apps/text/session/4350/push:1 
        
        
       Failed to load resource: the server responded with a status of 412 ()
attachments:1 
        
        
       Failed to load resource: the server responded with a status of 403 ()
14vue.runtime.esm.js:3065 Error: Debounced method called with different contexts.
    at o.c (index.js:39:10)
    at onUpdate (editorMixin.js:123:12)
    at li.<anonymous> (editor.js:64:4)
    at xn (vue.runtime.esm.js:3033:30)
    at t.$emit (vue.runtime.esm.js:3732:17)
    at s.emit (Editor.vue:699:1)
    at at.onUpdate (Editor.vue:518:1)
    at index.js:155:52
    at Array.forEach (<anonymous>)
    at at.emit (index.js:155:23)
An @ vue.runtime.esm.js:3065
Show 1 more frame
Show less
ConsoleLogger.js:74 [ERROR] text: Unexpected Error "Failed to apply steps. Retry!" Object
value @ ConsoleLogger.js:74
Show 1 more frame
Show less
38vue.runtime.esm.js:3065 Error: Debounced method called with different contexts.
    at o.c (index.js:39:10)
    at onUpdate (editorMixin.js:123:12)
    at li.<anonymous> (editor.js:64:4)
    at xn (vue.runtime.esm.js:3033:30)
    at t.$emit (vue.runtime.esm.js:3732:17)
    at s.emit (Editor.vue:699:1)
    at at.onUpdate (Editor.vue:518:1)
    at index.js:155:52
    at Array.forEach (<anonymous>)
    at at.emit (index.js:155:23)
An @ vue.runtime.esm.js:3065
Show 1 more frame
Show less
ConsoleLogger.js:74 [ERROR] text: Unexpected Error "Failed to apply steps. Retry!" Object
value @ ConsoleLogger.js:74
Show 1 more frame
Show less
17vue.runtime.esm.js:3065 Error: Debounced method called with different contexts.
    at o.c (index.js:39:10)
    at onUpdate (editorMixin.js:123:12)
    at li.<anonymous> (editor.js:64:4)
    at xn (vue.runtime.esm.js:3033:30)
    at t.$emit (vue.runtime.esm.js:3732:17)
    at s.emit (Editor.vue:699:1)
    at at.onUpdate (Editor.vue:518:1)
    at index.js:155:52
    at Array.forEach (<anonymous>)
    at at.emit (index.js:155:23)
An @ vue.runtime.esm.js:3065
Show 1 more frame
Show less
ConsoleLogger.js:74 [ERROR] text: Unexpected Error "Failed to apply steps. Retry!" Object
value @ ConsoleLogger.js:74
Show 1 more frame
Show less
20vue.runtime.esm.js:3065 Error: Debounced method called with different contexts.
    at o.c (index.js:39:10)
    at onUpdate (editorMixin.js:123:12)
    at li.<anonymous> (editor.js:64:4)
    at xn (vue.runtime.esm.js:3033:30)
    at t.$emit (vue.runtime.esm.js:3732:17)
    at s.emit (Editor.vue:699:1)
    at at.onUpdate (Editor.vue:518:1)
    at index.js:155:52
    at Array.forEach (<anonymous>)
    at at.emit (index.js:155:23)
An @ vue.runtime.esm.js:3065
Show 1 more frame
Show less
ConsoleLogger.js:74 [ERROR] text: Unexpected Error "Failed to apply steps. Retry!" Object
value @ ConsoleLogger.js:74
Show 1 more frame
Show less
16vue.runtime.esm.js:3065 Error: Debounced method called with different contexts.
    at o.c (index.js:39:10)
    at onUpdate (editorMixin.js:123:12)
    at li.<anonymous> (editor.js:64:4)
    at xn (vue.runtime.esm.js:3033:30)
    at t.$emit (vue.runtime.esm.js:3732:17)
    at s.emit (Editor.vue:699:1)
    at at.onUpdate (Editor.vue:518:1)
    at index.js:155:52
    at Array.forEach (<anonymous>)
    at at.emit (index.js:155:23)
An @ vue.runtime.esm.js:3065
Show 1 more frame
Show less
ConsoleLogger.js:74 [ERROR] text: Unexpected Error "Failed to apply steps. Retry!" Object
value @ ConsoleLogger.js:74
Show 1 more frame
Show less
65vue.runtime.esm.js:3065 Error: Debounced method called with different contexts.
    at o.c (index.js:39:10)
    at onUpdate (editorMixin.js:123:12)
    at li.<anonymous> (editor.js:64:4)
    at xn (vue.runtime.esm.js:3033:30)
    at t.$emit (vue.runtime.esm.js:3732:17)
    at s.emit (Editor.vue:699:1)
    at at.onUpdate (Editor.vue:518:1)
    at index.js:155:52
    at Array.forEach (<anonymous>)
    at at.emit (index.js:155:23)
An @ vue.runtime.esm.js:3065
Show 1 more frame
Show less
ConsoleLogger.js:74 [ERROR] text: Unexpected Error "Failed to apply steps. Retry!" Object
value @ ConsoleLogger.js:74
Show 1 more frame
Show less
17vue.runtime.esm.js:3065 Error: Debounced method called with different contexts.
    at o.c (index.js:39:10)
    at onUpdate (editorMixin.js:123:12)
    at li.<anonymous> (editor.js:64:4)
    at xn (vue.runtime.esm.js:3033:30)
    at t.$emit (vue.runtime.esm.js:3732:17)
    at s.emit (Editor.vue:699:1)
    at at.onUpdate (Editor.vue:518:1)
    at index.js:155:52
    at Array.forEach (<anonymous>)
    at at.emit (index.js:155:23)
An @ vue.runtime.esm.js:3065
Show 1 more frame
Show less
index.js:314 OC.requestToken changed XEea4U6rLoQg4uzNtWcU8WcpoYlMixUC/DkYWDe3uxY=:KSXdrjfHf+h40YKhnghcmFVA7eoWxkFwqgFNDnLhi3A=
34vue.runtime.esm.js:3065 Error: Debounced method called with different contexts.
    at o.c (index.js:39:10)
    at onUpdate (editorMixin.js:123:12)
    at li.<anonymous> (editor.js:64:4)
    at xn (vue.runtime.esm.js:3033:30)
    at t.$emit (vue.runtime.esm.js:3732:17)
    at s.emit (Editor.vue:699:1)
    at at.onUpdate (Editor.vue:518:1)
    at index.js:155:52
    at Array.forEach (<anonymous>)
    at at.emit (index.js:155:23)
An @ vue.runtime.esm.js:3065
Show 1 more frame
Show less
Editor.vue:699 Error: Debounced method called with different contexts.
    at o.c (index.js:39:10)
    at onUpdate (editorMixin.js:123:12)
    at li.<anonymous> (editor.js:64:4)
    at xn (vue.runtime.esm.js:3033:30)
    at t.$emit (vue.runtime.esm.js:3732:17)
    at s.emit (Editor.vue:699:1)
    at at.onUpdate (Editor.vue:518:1)
    at index.js:155:52
    at Array.forEach (<anonymous>)
    at at.emit (index.js:155:23)
An @ vue.runtime.esm.js:3065
Sn @ vue.runtime.esm.js:3057
On @ vue.runtime.esm.js:3024
xn @ vue.runtime.esm.js:3040
t.$emit @ vue.runtime.esm.js:3732
emit @ Editor.vue:699
onUpdate @ Editor.vue:518
(anonymous) @ index.js:155
emit @ index.js:155
setEditable @ index.js:3511
onChange @ Editor.vue:558
(anonymous) @ mitt.mjs:1
emit @ mitt.mjs:1
emit @ SyncService.js:321
_handleResponse @ PollingBackend.js:128
Show 10 more frames
Show less

@punkyard punkyard added the bug Something isn't working label May 17, 2024
@mejo-
Copy link
Member

mejo- commented May 17, 2024

Hey @punkyard, which version of Nextcloud 28 do you run? We fixed issues with duplicated content in Nextcloud Text with the 28.0.5 release. If you still run 28.0.4, upgrading might help.

@punkyard
Copy link
Author

Hello @mejo- here are the correct versions of my apps:
NC AiO 8.2.1
NC 28.0.5
Collectives 2.11.0

@mejo-
Copy link
Member

mejo- commented May 18, 2024

@punkyard could it be that the duplicated content originates from an editing session that was still with Nextcloud 28.0.4? We're aware of this duplicated content problem with Nextcloud 28.0.4, but I really hope we fixed it with 28.05. So it would be important to know whether this is still reproducible for you with 28.0.5.

@punkyard
Copy link
Author

punkyard commented May 19, 2024

this woud be hard to tell, maybe. If the doubling doesn't occur again, then it's perfect ^^ so far, so good.

@mejo-
Copy link
Member

mejo- commented May 20, 2024

Perfect, then let's wait a few more days and I'll close the issue if I don't hear from you again. Please report back if this happens to you again 😊

@nunoleite
Copy link

Hi!
Nextcloud 27.1.9
Collectives 2.11.0
I'm having this problem too.
Just opening and viewing a collective, the content shows repeated.

@mejo-
Copy link
Member

mejo- commented May 21, 2024

@nunoleite could it be that the duplicated content originates from an editing session that was still with Nextcloud 28.0.4? We're aware of this duplicated content problem with Nextcloud 28.0.4, but I really hope we fixed it with 28.05. So it would be important to know whether this is still reproducible for you with 28.0.5.

@nunoleite
Copy link

I'm still on version 27.1.9 (waiting for the app News to be compatible with 28).
And i just opened a collective minutes before i sent the message.

@sen4git
Copy link

sen4git commented May 21, 2024

Hello,
I just started with collectives as a wiki for teachers of a high-school and encountered the same effect, that some collective-sites have doubled content (text and pictures).
That was on version 25.
After update to version 28 the problem still remains.

It is related to problems with "unsaved changes" of the collective-site.
Unsaved changes are indicated by a little blue dot under the tick (to save the site).
unsaved_changes

The unsaved-changes-problem is even bigger than the doubled-content-problem. I encoutered it on multiple but not all sites:

  • I clicked the tick to save a collective-site (that includes pictures) and everything looks fine.
  • Sometimes I encounter that a normal user (without rights to change the collective) doesn't see the pictures an that site but a broken link.
  • When I check that site, the tick with the blue dot indicates that there are unsaved changes of the site. I repeated saving the site but the site remained with unsaved changes - after some minutes .....

I worked around:

  • Opened that site in the files-app
  • AND IN THE FILES-APP THE CONTENT OFTEN APPEARED DOUBLED !!!
  • I removed the doubled content in the files-app and saved the site in the files-app => OK (in most cases)

Hope that helps targeting the source of the problem.

Thanks for your work!!!

@sen4git
Copy link

sen4git commented May 21, 2024

PS: The unsaved-changes-problem really appears often and we have to check all new or updated sites with a normal user-account (without rights to change the collective) after 10 minutes for broken links to pictures...

@sen4git
Copy link

sen4git commented May 21, 2024

PPS: We are on version 28.0.3

@punkyard
Copy link
Author

hi @sen4git
for how long have you been using Collectives for publishing courses?

We have used it for two years - but we stopped. Too much time and effort to work with. Plus new functions we didnt like, that are not options.

We have moved to a mix of markdown and direct publishing, with Compiiile and Logseq (very useful to project in class)

@mejo-
Copy link
Member

mejo- commented May 22, 2024

Dear @sen4git, as mentioned above the issue only got fixed with Nextcloud release 28.0.5. You encounter this issue because you still run Nextcloud 28.0.3.

@sen4git
Copy link

sen4git commented May 22, 2024

Hi punkyard,
thanks for the tips. I'll take a look on them. We will stick to collectives as wiki, because we need an nextcloud-integrated wiki.

Hi mejo,
thanks - I hope that the related "unsaved-changes-problem" with the broken links to pictures will also disappear with 28.0.5.

@estux
Copy link

estux commented May 22, 2024

Dear @sen4git, as mentioned above the issue only got fixed with Nextcloud release 28.0.5. You encounter this issue because you still run Nextcloud 28.0.3.

@mejo- I just encountered a similar issue (rendered duplicated text) on Readme.md preview (folder description) above file list in a folder. I'm running 28.0.5. Should I report this to server repo or Text repo? Thank you very much!

@max-nextcloud
Copy link
Collaborator

I just encountered a similar issue (rendered duplicated text) on Readme.md preview (folder description) above file list in a folder. I'm running 28.0.5. Should I report this to server repo or Text repo? Thank you very much!

Could you check if the file actually contains the duplicate content? If it does, could you check if there's a version in which it was introduced and if that happened when 28.0.5 had already been deployed? Thanks!

@estux
Copy link

estux commented May 23, 2024

I just encountered a similar issue (rendered duplicated text) on Readme.md preview (folder description) above file list in a folder. I'm running 28.0.5. Should I report this to server repo or Text repo? Thank you very much!

Could you check if the file actually contains the duplicate content? If it does, could you check if there's a version in which it was introduced and if that happened when 28.0.5 had already been deployed? Thanks!

Hello @max-nextcloud I downloaded the .md file to check (not opened it first in the online editor). The file doesn't contain the duplicate content. Then I tried to open the Readme.md in the online editor and instantly the doubled content was written and saved in the file permanently.

This seems to happen only with Readme.md files as I tried to open other .md files and also the Collectives editor and the duplicated content bug doesn't seem to happen.

@max-nextcloud max-nextcloud changed the title TEXT IS DOUBLED AFTER OPENING A PAGE IN COLLECTIVES Text is doubled after opening a page in collectives May 25, 2024
@br4yd
Copy link

br4yd commented May 27, 2024

Fyi I had the same issue happening with all my notes in the Nextcloud Notes app after upgrading to 28 and then 29.

@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Office team Jun 5, 2024
@mejo- mejo- moved this from 🧭 Planning evaluation (don't pick) to 📄 To do (~10 entries) in 📝 Office team Jun 5, 2024
@mejo- mejo- self-assigned this Jun 5, 2024
@mejo-
Copy link
Member

mejo- commented Jun 5, 2024

If this happens to documents that you open the first time since longer, this might be because there is still an outdated session from before the upgrade for this document stored in the database.

If you open a document for the first time since the upgrade and experience duplicated content, you could check the following:

  • Download the markdown file and see if the duplicated content is there as well
  • If that's not the case, run php occ text:reset <file_id> and reload the page. The duplicated content should be gone

For documents that have been opened and closed in the meantime, you probably have to fix them manually. Sorry for that.

@mejo-
Copy link
Member

mejo- commented Jun 5, 2024

And please continue reporting cases where this happens!

For now our understanding is that this happens for old documents with an editing session from before the upgrade to 28.0.5 (or 27.1.9) when they get opened again for the first time.

Particularly interesting would be cases like the following:

  • Duplicated content in a file that for sure only got created after the upgrade
  • Duplicated content again in a file that already had been opened since the last upgrade and cleaned up

@estux
Copy link

estux commented Jun 6, 2024

And please continue reporting cases where this happens!

For now our understanding is that this happens for old documents with an editing session from before the upgrade to 28.0.5 (or 27.1.9) when they get opened again for the first time.

Particularly interesting would be cases like the following:

* Duplicated content in a file that _for sure_ only got created _after_ the upgrade

* Duplicated content again in a file that already had been opened since the last upgrade and cleaned up

Hello @mejo- I'm sorry to bother but I think I have to report another case as it's hitting my server quite randomly (apparently).
Just a note: this is related to duplicated content in general and not directly related to Collective. I hope it's still the right place to let you know as you pointed out.

I have some Readme.md and Leggimi.md (some of them apparently generated with the name translated in italian as my laptop uses the IT language). All of them are files used for folder descriptions as the name implies.
This morning (some minutes ago) I was just navigating the folder tree to see what's the content of some folders and when I entered a folder with a Leggimi.md created on 13/12/2023 it immediately (and alone) modified the file and I saw duplicated content in the preview-description above the files. I saw immediately this problem because of modified timestamp when I was coming back to the previous folder. So I downloaded the file and checked that the duplicated content was just also written in the file by the system.

The same problem happened yesterday evening with a Readme.md file (older, untouched from 2021) modified by the system just navigating the folder which contains it.

So apparently there's no difference in behaviour between Readme.md and Leggimi.md files.

I checked the exact timestamp on nextcloud.log to see if some errors are registered but I'm just seeing this:
{"reqId":"m03dD94WpK44zooFwEWF","level":1,"time":"2024-06-06T13:14:06+02:00","remoteAddr":"myIP (sensitive)","user":"name of the user(sensitive)","app":"text","method":"PUT","url":"/apps/text/session/209277/create","message":"Keep previous document of 209277","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0","version":"28.0.6.1","data":{"app":"text"},"id":"66619b1a8aa4f"}

@mejo- mejo- moved this from 📄 To do (~10 entries) to 🏗️ In progress in 📝 Office team Jun 10, 2024
@mejo-
Copy link
Member

mejo- commented Jun 10, 2024

Thanks @estux. As mentioned earlier, the problem is two-fold:

  • Affected files likely still have old steps from before the upgrade stored in their editing session. That's why it's important to reset the editing session by running occ text:reset -f <file_id> for these files.
  • If the duplicated content did not get persisted yet to the markdown file, the duplicated content should be gone after resetting the editing session with the command from above.
  • For files where the duplicated content got already written to the markdown file, you'll have to clean it up manually once, but still should run the reset command for these files.

We understand that this is unexpected behaviour and an inconvenient bug. We're currently working on a fix to reset all old editing sessions with the upcoming Nextcloud bugfix releases.

@estux
Copy link

estux commented Jun 10, 2024

Thanks @estux. As mentioned earlier, the problem is two-fold:

* Affected files likely still have old steps from before the upgrade stored in their editing session. That's why it's important to reset the editing session by running `occ text:reset -f <file_id>` for these files.

* If the duplicated content did not get persisted yet to the markdown file, the duplicated content should be gone after resetting the editing session with the command from above.

* For files where the duplicated content got already written to the markdown file, you'll have to clean it up manually once, but still should run the reset command for these files.

We understand that this is unexpected behaviour and an inconvenient bug. We're currently working on a fix to reset all old editing sessions with the upcoming Nextcloud bugfix releases.

Hello @mejo- thank you for the detailed answer!
Sadly I cannot do this step (even if I would know how to do) because I'm using Nextcloud by a provider without SSH access and without root access. So I would need to comunicate all the files names to my provider to act on them (even if practically it could already know them as the server is not encrypted). Thank you the same, I think I can only wait for the update.

mejo- added a commit to nextcloud/text that referenced this issue Jun 11, 2024
@mejo- mejo- moved this from 🏗️ In progress to 👀 In review in 📝 Office team Jun 11, 2024
mejo- added a commit to nextcloud/text that referenced this issue Jun 12, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ☑️ Done in 📝 Office team Jun 12, 2024
backportbot bot pushed a commit to nextcloud/text that referenced this issue Jun 12, 2024
backportbot bot pushed a commit to nextcloud/text that referenced this issue Jun 12, 2024
Fixes: #5420

Fixes: nextcloud/collectives#1270

Signed-off-by: Jonas <jonas@freesources.org>

[skip ci]
backportbot bot pushed a commit to nextcloud/text that referenced this issue Jun 12, 2024
Fixes: #5420

Fixes: nextcloud/collectives#1270

Signed-off-by: Jonas <jonas@freesources.org>

[skip ci]
mejo- added a commit to nextcloud/text that referenced this issue Jun 12, 2024
mejo- added a commit to nextcloud/text that referenced this issue Jun 12, 2024
backportbot bot pushed a commit to nextcloud/text that referenced this issue Jun 12, 2024
mejo- added a commit to nextcloud/text that referenced this issue Jun 12, 2024
mejo- added a commit to nextcloud/text that referenced this issue Jun 12, 2024
mejo- added a commit to nextcloud/text that referenced this issue Jun 12, 2024
mejo- added a commit to nextcloud/text that referenced this issue Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs info
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants