opencarecc / graph-ryder-dashboard

A dashboard for exploring and summarizing an online forum with ethnographic coding
http://opencare.cc
Apache License 2.0
3 stars 1 forks source link

Add the missing comments to the comment counter #13

Closed albertocottica closed 7 years ago

albertocottica commented 7 years ago

See this comment: https://github.com/opencarecc/graph-ryder-dashboard/issues/7#issuecomment-283083095

guywiz commented 7 years ago

Adjusting the counter is one thing. Adjusting the network structure is another ... and I suggest not to go with a quick and dirty fix. There should be a "procedure" to follow when some content is deleted, to make sure the comment structure can be recovered. Something like introducing phantom nodes (placeholders) so we can at least show a structure and not blantly connect all remaining comments directly to the original post.

albertocottica commented 7 years ago

How are you going to do that? The only way would be to write a Drupal module that replaces any deleted post or comment with a phantom one having the same ID. It has to be automatic, because it is users, not us, deleting their content.

Two more observations. One: when a post or comment is deleted, even if the structure of the thread collapses, the semantic value of the non-deleted part of the thread remains. Amelia will still code this material. So, it still makes sense to import it (and its annotations and codes) into GraphRyder, and use it.

Two: when a post or comment is deleted, its children comments are also deleted. I cannot be 100% sure they are deleted also from the database (I do not have direct access via SQL query) but the standard admin view does not show them anymore.

Anyway: it happened only once in six years that a user deleted his account, and even then I think the content remained. These 50 comments here were never deleted, but simply reallocated as a result of the bug in the migration script.

albertocottica commented 7 years ago

Any news on this issue, @jason-vallet ?

jason-vallet commented 7 years ago

/!\ Wall of text incoming! (with some pictures) /!\

So I took a much closer look at some of the rogue comments, and particularly the details given by the devel info, and I think the issue is indeed linked with a past migration in Drupal and some unmapped ids.

For instance, looking at a thread which behaves correctly Kindness and Connection Can Sustain Us Through Tough Times., a normal response to a post looks like that: screenshot from 2017-05-05 14 52 54 with the response comment such as: screenshot from 2017-05-05 14 54 06 (The cid of the parent passes to the pid)

For the comments which misbehave like in A family on my own, the original comment shows screenshot from 2017-05-05 15 11 28 but the response looks like screenshot from 2017-05-05 14 58 15

The pid is simply not the right one, instead targeting a comment with the wrong id. The corresponding comment with this particular id exists on Edgeryders (right here) but have obviously nothing to do with the thread above. This is why I think the problem is related to the migration of Drupal. It would seem the mapping concerning the nodes (the posts) has been managed without problem (thus the nid are okay) but the same can not be said about the pid.

To be thorough, I have checked with a few other older threads and the same problem also appears, for instance with this comment and its response, we have: screenshot from 2017-05-05 15 21 28 and screenshot from 2017-05-05 15 22 05

For now, I have set a fix to ignore these cases where the comments are just attached to the originating post, but this means that the conversations and their structure are not available.

So we go from this screenshot from 2017-05-05 15 36 47 to that screenshot from 2017-05-05 15 35 51 The content is there but it is not really a proper fix.

For a complete fix (which would also be better for Edgeryders), the issue should be attacked directly at the source. I have tried to correct the problematic values by hand but I don't seem to have access to them through the website. Drupal still display the nodes and their comments appropriately so I guess their is some (secret?!) field I am missing which contains the right information. I don't really know much about Drupal so maybe Matthias could work some of his wizardry over it ?

albertocottica commented 7 years ago

A clean fix is not worth the effort. We just put it down to grit in the data, and move on. The conversation structure does not affect the co-occurrences graph, which is a small silver lining. I would still like the rogue comments in the database. :-)

On Fri, May 5, 2017 at 3:42 PM, jason-vallet notifications@github.com wrote:

/!\ Wall of text incoming! (with some pictures) /!\

So I took a much closer look at some of the rogue comments, and particularly the details given by the devel info, and I think the issue is indeed linked with a past migration in Drupal and some unmapped ids.

For instance, looking at a thread which behaves correctly Kindness and Connection Can Sustain Us Through Tough Times. https://edgeryders.eu/node/7309, a normal response to a post looks like that: [image: screenshot from 2017-05-05 14 52 54] https://cloud.githubusercontent.com/assets/2879855/25746186/946a1b6a-31a2-11e7-9011-c8f901b99e67.png with the response comment such as: [image: screenshot from 2017-05-05 14 54 06] https://cloud.githubusercontent.com/assets/2879855/25746218/b70543ac-31a2-11e7-8692-6078c146da4f.png (The cid of the parent passes to the pid)

For the comments which misbehave like in A family on my own https://edgeryders.eu/node/984, the original comment shows [image: screenshot from 2017-05-05 15 11 28] https://cloud.githubusercontent.com/assets/2879855/25746762/28cac316-31a5-11e7-8099-2692be8b4c0b.png but the response looks like [image: screenshot from 2017-05-05 14 58 15] https://cloud.githubusercontent.com/assets/2879855/25746340/4f408b9a-31a3-11e7-968c-7888191e822a.png

The pid is simply not the right one, instead targeting a comment with the wrong id. The corresponding comment with this particular id exists on Edgeryders (right here https://edgeryders.eu/en/comment/1415#comment-1415) but have obviously nothing to do with the thread above. This is why I think the problem is related to the migration of Drupal. It would seem the mapping concerning the nodes (the posts) has been managed without problem (thus the nid are okay) but the same can not be said about the pid.

To be thorough, I have checked with a few other older threads and the same problem also appears, for instance with this comment https://edgeryders.eu/en/comment/4487#comment-4487 and its response https://edgeryders.eu/en/comment/4492#comment-4492, we have: [image: screenshot from 2017-05-05 15 21 28] https://cloud.githubusercontent.com/assets/2879855/25747082/88d8a434-31a6-11e7-9c8f-8682ee77dab5.png and [image: screenshot from 2017-05-05 15 22 05] https://cloud.githubusercontent.com/assets/2879855/25747101/a0ea011c-31a6-11e7-9a4a-f3c8e16760b2.png

For now, I have set a fix to ignore these cases where the comments are just attached to the originating post, but this means that the conversations and their structure are not available.

So we go from this [image: screenshot from 2017-05-05 15 36 47] https://cloud.githubusercontent.com/assets/2879855/25747701/adf9bff8-31a8-11e7-8e0e-75584a669af5.png to that [image: screenshot from 2017-05-05 15 35 51] https://cloud.githubusercontent.com/assets/2879855/25747673/98f6c998-31a8-11e7-98e8-d4ad98a1e948.png The content is there but it is not really a proper fix.

For a complete fix (which would also be better for Edgeryders), the issue should be attacked directly at the source. I have tried to correct the problematic values by hand but I don't seem to have access to them through the website. Drupal still display the nodes and their comments appropriately so I guess their is some (secret?!) field I am missing which contains the right information. I don't really know much about Drupal so maybe Matthias could work some of his wizardry over it ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/opencarecc/graph-ryder-dashboard/issues/13#issuecomment-299467640, or mute the thread https://github.com/notifications/unsubscribe-auth/AB4p5jcyErMowLoa2oV7R9GWXHHk_cTPks5r2ycugaJpZM4MSOMI .

jason-vallet commented 7 years ago

This issue has been addressed and the elements are now available. Be warn that the comments responding to other comments can not be linked to their appropriate parents, and thus the more ancient conversations do not have hierarchical structures as shown in my last picture.

You have mentioned 2 weeks ago that you were planning some installation/update/migration in the coming months. I can only advise you to be extra vigilant and double check all potential transformations if some update is scheduled as some solutions do not always care to preserve the consistency from one version to another.