-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Comments and count missing from profile page #2588
Comments
okay I guess I know what the problem is, due to this #2373 newly generated comments are having status = 1 and while fetching comment_count we are taking considering those comments with status = 0 only. @jywarren please have a look at #2373 (comment) .Thanks. |
I see! Shall we flip comment_count to ==0 then?
…On Fri, Apr 6, 2018 at 2:13 PM, Gaurav Sachdeva ***@***.***> wrote:
okay I guess I know what the problem is, due to this #2373
<#2373> newly generated comments
are having status = 1 and while fetching comment_count we are taking
considering those comments with status = 0 only. @jywarren
<https://github.com/jywarren> please have a look at #2373 (comment)
<#2373 (comment)>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2588 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ7e67aGoCm7OuhB9d0kbw9eZFHpCks5tl75GgaJpZM4TKjtr>
.
|
@jywarren we can change the status of all comments to 1 so that it matches node status pattern. By #2373 , I could only introduce the default field for comment status, but I guess for changing the status of all comments(old ones) migration need to be run on the production as I have stated here #2373 (comment). |
I believe as in #2373 we already have, as you pointed out -- the migration has been run already. But maybe there was a problem -- i see there are ~613 comments in the db with status = 0, starting with:
and ending with:
The first was 2018-02-20 and the last was today: 2018-04-09 So are we somehow not setting comment status for newly created comments properly? Aha! We typically use Lines 569 to 581 in 2f35d87
I can manually change all comments to status = 1 again with |
thanks, @jywarren for pointing out the model |
hi @jywarren I have checked our codebase for lines which could introduce comment with status = 0 , but can find only 2 appearances one as mentioned by you in node.rb and other is seed.rb file(which may someday trouble developer) so i opened a PR at #2615 fixing both of them after merging that you can run query to change status of all existing comments to 1. Thanks. |
The comments count are displayed correctly on the profile page currently and the link also works. Closing this. Thanks everyone |
Please describe the problem (or idea)
@eustatic has certainly commented, but I don't see any on https://publiclab.org/profile/eustatic
I wonder if there's a variable missing from the
profile
method in:https://github.com/publiclab/plots2/blob/master/app/controllers/users_controller.rb
We ought to test for that too -- a functional test with
assert_not_nil assigns(:comments)
maybe?The text was updated successfully, but these errors were encountered: