I just wanted to report a bug with Collectives. I have attempted to make the folder « Collectives » a public folder. The intent is to allow anyone edit the documents with the usual text editor if need be. This lead NC to crash.
Steps to reproduce the bug:
- Start with a non-empty collective set of pages, created with the standard collectives edition process.
- Create a group folder called « Collectives - 2 » .
- Migrate all content from the « Collectives » folder to « Collectives -2 ».
- Rename « Collectives » to « Collectives - old»
- Rename « Collectives -2 » to « Collectives »
I am pretty sure the crash happens because of step 4. For sure, the following things happen after step 5:
- The collectives app attempts to re-create a « Collectives » folder, as it does not recognize the group folder.
- Because there is already a group folder with that name, it creates a folder named « Collectives (1) ».
- As it does not recognize the « Collectives (n) » folder, it repeats steps 1 and 2 indefinitely, creating a folder « Collectives (n+1) » in the process.
- At some point, the server crashes because it cannot handle so much folders.
How to fix it:
Here are some suggestions:
- Allow the Collective app to work with/recognize group folders.
- Allow for folders « Collective (n) » to be acceptable substitutes for the original « Collectives ».
- Create protected keywords in the group folder creation process. E.g. a group folders called « Collectives » could not be created. This provides a patch, but does not fix the bug of folder creation.
- Add a state variable to the folder creation process, so that after n attempts, it stops and reports a bug.
How to fix the server crash in the meantime:
If that ever occurs to anyone, here are the steps to recover your nextcloud instance:
- With OCC, go in maintenance mode.
- With OCC, disable the « collectives app ».
- Delete all folders called « Collectives (n) ».
- Do steps 5 to 2 of the section « How to reproduce the bugs » in reverse.
- With OCC, quit maintenance mode.
I hope this helps.
Thanks for this promising app.