plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

Deleting a spam comment or answer might be deleting the question

Open Fastie opened this issue 8 years ago • 13 comments

I deleted a spam comment (or answer) on a question posted at publiclab.org and then I could not find the question.

I noticed that another question that had a spam answer had disappeared, maybe because another administrator had deleted the answer.

I don't have very good evidence that this is happening, but it is a serious enough issue that I thought I would bring it up just in case it is really happening.

Here is a question that I can't find:

https://publiclab.org/questions/qdominus/08-07-2017/could-this-720nm-ir-filter-from-ebay-be-used-for-ndvi-infragram

There was a spam answer posted to this question.

Fastie avatar Mar 08 '18 16:03 Fastie

hi @Fastie , I have found the bug and have raised a PR for the same. Although, I have detected the problem with answers only i.e. while deleting answer corresponding question is also deleted. I am still working on verifying if comments are also deleting the node. I will advise you not to delete any comment or answer until this issue is resolved as I found this problem is deleting the node.Thanks.

grvsachdeva avatar Mar 08 '18 19:03 grvsachdeva

Thank you @Gauravano ! Really, really appreciate your insight and sleuthing on this!!!!!!!!! 🚀

ebarry avatar Mar 08 '18 20:03 ebarry

oh wow this is quite serious. I wonder if we can work backwards to determine if other questions have been deleted from the system, and recover them from backups.

@gauravano are you filing a fix for this? Given that it involves potential data loss, we should fast-track this. I'll notify other moderators to hold off on answer deletions for now.

Any moderator or admin can do this:

https://github.com/publiclab/plots2/blob/master/app/controllers/answers_controller.rb#L40-L42

Probably we need to remove "dependent: destroy" from this line: https://github.com/publiclab/plots2/blob/master/app/models/answer.rb#L6

On Thu, Mar 8, 2018 at 3:01 PM, Liz Barry [email protected] wrote:

Thank you @Gauravano https://github.com/gauravano ! Really, really appreciate your insight and sleuthing on this!!!!!!!!! 🚀

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/2449#issuecomment-371606568, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ1ej73oYx3T0nwrUFDHx1LRC0HYDks5tcY4bgaJpZM4Si_qG .

jywarren avatar Mar 09 '18 20:03 jywarren

hi @jywarren , I have raised a PR at #2450 solving this issue and have also added some tests so that no such issue arises in future. Please have a look.

grvsachdeva avatar Mar 09 '18 20:03 grvsachdeva

Super. Thanks.

https://stable.publiclab.org/questions/qdominus/08-07-2017/could-this-720nm-ir-filter-from-ebay-be-used-for-ndvi-infragram

can be used to recover this record and re-instantiate it in the db (i'll do this)

However, @Fastie are there others you could definitively find that have been deleted and we should fish into our backups for?

If this has been happening for some time, we could run a search on our logs and try to find all instances of answers being deleted, using a regex pattern matcher. Would it have been more than once or twice?

jywarren avatar Mar 09 '18 20:03 jywarren

Thank you @Fastie for reporting and @Gauravano for submitting a fix!!!

jywarren avatar Mar 09 '18 20:03 jywarren

I think there is at least one other question that was deleted when I deleted a spam answer about one to two weeks ago. I am not sure how I became aware of the spam answer but I think it was a question that I had answered some time ago. I think it was about infrared stuff.

I think there might be one other case in which I was suspicious that something weird had happened. Then I noticed the most recent one about the infrared filter. The two or three similar cases made me suspicious that something was broken.

So there might be two or three cases of deleted questions, but I guess any answer that was deleted in the last (2 to ?) weeks would have deleted the question. If any moderators remember deleting a spam answer (or any answer), there could be more. If moderators have not deleted answers, there might not be more cases.

Fastie avatar Mar 09 '18 21:03 Fastie

Was it this one? https://publiclab.org/questions/warren/11-14-2017/what-s-one-thing-that-could-be-better-for-newcomers-about-the-public-lab-website

jywarren avatar Mar 09 '18 21:03 jywarren

Hah! I just found that one too. I don't know if that was one of the ones I had run into.

Fastie avatar Mar 09 '18 21:03 Fastie

and https://publiclab.org/questions/warren/08-16-2016/does-the-new-question-feature-work

jywarren avatar Mar 09 '18 21:03 jywarren

Here a couple of missing questions:

https://publiclab.org/questions/J_tanna/01-30-2017/difference-between-image-calibration-and-camera-calibration

https://publiclab.org/questions/warren/12-13-2017/is-anyone-studying-or-writing-about-the-rise-in-codes-of-conduct-in-open-source-projects#a806

Fastie avatar Mar 09 '18 21:03 Fastie

https://publiclab.org/questions/gretchengehrke/08-02-2017/what-is-the-best-low-cost-or-diy-microscope-to-use-with-a-group#a839

https://publiclab.org/questions/warren/10-27-2017/what-sessions-would-people-like-to-have-at-the-2017-barnraising#a840

jywarren avatar Mar 09 '18 21:03 jywarren

OK -- we're probably going to have to recover the answers too, but I'm not sure about that. We'll see!

jywarren avatar Mar 09 '18 21:03 jywarren