Join GitHub today
Error while posting comment in web view #27012
Steps to reproduce
comment should be posted
error occurs while posting comment
oC 9.1.3 EEe
log file content:
The funny thing is, if the page gets reloaded, the comment appears successfully!
@butonic managed to mitigate the issue with a patch:
From what I see in the stack, the problem happens in the activity app when the comment code is trying to post its activity. It is likely that either there is a deleted/ghost user who has access to that file and it is isn't excluded properly, or some other kind of ghostly... things.
Tried with a deleted user as recipient, no exception.
Looking at the stack trace it almost looks like the comment is being posted on a fileid linked to a user that doesn't exist or could not be resolved. How is that even possible ? Maybe someone deleted the share owner (maybe the owner is a zombie/remnant) and someone else kept the web UI open and tried posting a comment on the file still visible in the UI (a refresh would make it disappear).
Let's try that...
I managed to simulate a similar issue by manually setting the field "user_id" to "unexist" in the "oc_mounts" table. Since this is only a cache, it could happen that it contains references to deleted users so this needs to be handled gracefully.
Not sure how to create the situation from scratch, but I think this information is enough to justify the fix from the patch.
Okay, I found some steps:
"Error posting comment"