Skip to content
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

fix: prevent give_payment_note from affecting comment count #3588

Closed
kevcampb opened this issue Aug 9, 2018 · 7 comments
Closed

fix: prevent give_payment_note from affecting comment count #3588

kevcampb opened this issue Aug 9, 2018 · 7 comments
Assignees

Comments

@kevcampb
Copy link

kevcampb commented Aug 9, 2018

The give plugin writes in to wp_comments with a comment_type of 'give_payment_note'

These database entires cause problems on the Wordpress Comments section on the admin site, as they appear in the total comment counts, but not show up due to the non-standard comment-type.

I cannot find any documentation on the purpose of these entries, so I'm unclear as to whether they can be deleted safely.

@ravinderk ravinderk self-assigned this Aug 9, 2018
@ravinderk
Copy link
Collaborator

@kevcampb
I am unable to reproduce this issue. Please check video for more details:

https://www.useloom.com/share/a3171a16174749a4ad73ed98fde140b4

@kevcampb
Copy link
Author

kevcampb commented Aug 9, 2018

Ravinderk, thanks for taking the time to look at this.

The issue, which is clearly visible in your video, is that there are 2381 comments in total, but only 1 is shown. The others cannot be seem as they are not real comments.

There is a deeper issue here with using the wp_comments table in this way, and it seems likely this will conflict with other plugins or future updates to that table.

@ravinderk
Copy link
Collaborator

@kevcampb As I told you this is my dev environment and I also installed woocommerce on this. Those 2380 comments out 2381 comments is from Woocommerce.

image

@DevinWalker
Copy link
Member

Resolved via #3627

@mehul0810
Copy link
Contributor

@kevinwhoffman While testing this issue and discussion with @ravinderk, it seems that we don't have a filter to exclude the comments count of give_payment_note in wp_comment due to which we have created a separate comments table for Give. Now, after migration as we are not deleting the comments data from wp_comments and its metatable. Then, this issue will still exist for customers as the Give comments exist in wp_comments. I would suggest having a health check plugin to delete comments from wp_comments and wp_commentmeta so that support team can help customers delete the Give comments from the old tables after confirming successful migration. Hence, re-opening the issue

Let me know your thoughts.

@mehul0810 mehul0810 reopened this Oct 22, 2018
@impress-org impress-org deleted a comment from mehul0810 Oct 22, 2018
@impress-org impress-org deleted a comment from mehul0810 Oct 22, 2018
@kevinwhoffman kevinwhoffman changed the title give_payment_note in wp_comments table fix: prevent give_payment_note from affecting comment count Oct 22, 2018
@kevinwhoffman
Copy link
Contributor

Slack Chat Summary

Participants: @DevinWalker @kevinwhoffman @ravinderk
Topic: Whether to remove old comments in 2.3.0 or later
Result: We agree to take care of removing those old comments in 2.3.0 rather than wait for a future release, which would require another DB upgrade and cause support issues in the meantime.

@ravinderk Please move forward with the fix to remove old comments only if we can be sure that the comments have been successfully migrated to the custom tables.

@ravinderk
Copy link
Collaborator

Closing this issue in favor of #3737 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants