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

refactor(comment): create custom comment table #3627 #3659

Merged
merged 73 commits into from
Sep 14, 2018

Conversation

ravinderk
Copy link
Collaborator

@ravinderk ravinderk commented Sep 7, 2018

Description

This pr will resolve #3627

How Has This Been Tested?

Check testing todo list under Todo heading in issue description.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows has proper inline documentation.

# Conflicts:
#	includes/class-give-db.php
# Conflicts:
#	includes/class-give-db.php
@DevinWalker
Copy link
Member

@raftaar1191 please make it a priority to test this when you get online.

@raftaar1191
Copy link
Contributor

Finding

At the time of sending the Donor Note from dashboard getting PHP notices

Video Link: https://screencast-o-matic.com/watch/cFQIrsqdpa

image

Debug log

[13-Sep-2018 21:51:38 UTC] PHP Notice: Trying to get property of non-object in /app/public/wp-content/plugins/Give/includes/emails/class-give-email-tags.php on line 1503 [13-Sep-2018 21:51:38 UTC] PHP Stack trace: [13-Sep-2018 21:51:38 UTC] PHP 1. {main}() /app/public/wp-admin/admin-ajax.php:0 [13-Sep-2018 21:51:38 UTC] PHP 2. do_action() /app/public/wp-admin/admin-ajax.php:100 [13-Sep-2018 21:51:38 UTC] PHP 3. WP_Hook->do_action() /app/public/wp-includes/plugin.php:453 [13-Sep-2018 21:51:38 UTC] PHP 4. WP_Hook->apply_filters() /app/public/wp-includes/class-wp-hook.php:310 [13-Sep-2018 21:51:38 UTC] PHP 5. give_ajax_store_payment_note() /app/public/wp-includes/class-wp-hook.php:286 [13-Sep-2018 21:51:38 UTC] PHP 6. do_action() /app/public/wp-content/plugins/Give/includes/admin/payments/actions.php:497 [13-Sep-2018 21:51:38 UTC] PHP 7. WP_Hook->do_action() /app/public/wp-includes/plugin.php:453 [13-Sep-2018 21:51:38 UTC] PHP 8. WP_Hook->apply_filters() /app/public/wp-includes/class-wp-hook.php:310 [13-Sep-2018 21:51:38 UTC] PHP 9. Give_Donor_Note_Email->send_note() /app/public/wp-includes/class-wp-hook.php:286 [13-Sep-2018 21:51:38 UTC] PHP 10. Give_Email_Notification->send_email_notification() /app/public/wp-content/plugins/Give/includes/admin/emails/class-donor-note-email.php:78 [13-Sep-2018 21:51:38 UTC] PHP 11. give_do_email_tags() /app/public/wp-content/plugins/Give/includes/admin/emails/abstract-email-notification.php:793 [13-Sep-2018 21:51:38 UTC] PHP 12. Give_Email_Template_Tags->do_tags() /app/public/wp-content/plugins/Give/includes/emails/class-give-email-tags.php:300 [13-Sep-2018 21:51:38 UTC] PHP 13. preg_replace_callback() /app/public/wp-content/plugins/Give/includes/emails/class-give-email-tags.php:168 [13-Sep-2018 21:51:38 UTC] PHP 14. Give_Email_Template_Tags->do_tag() /app/public/wp-content/plugins/Give/includes/emails/class-give-email-tags.php:168 [13-Sep-2018 21:51:38 UTC] PHP 15. give_email_tag_donor_note() /app/public/wp-content/plugins/Give/includes/emails/class-give-email-tags.php:194

@raftaar1191
Copy link
Contributor

Finding

The user ID is missing from the wp_comment table as well as from give_comment table to

We should update the user_id first in a wp_comment table and then update the update the DB so that everything works well

image

image

@raftaar1191
Copy link
Contributor

raftaar1191 commented Sep 13, 2018

I guess we should create a new issue for this but not sure so adding this here only. if feel should create a separate issue for this then please create it @ravinderk

  1. At the time of exporting the donation, I do not see any columns that display Donor Commentsimage

  2. Also did not find any fields for importing donor comment from CSV
    image

Copy link
Contributor

@raftaar1191 raftaar1191 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ravinderk kindly look into the issue that I commented out in the PR and let me know if you are not able to regenerate it

@ravinderk
Copy link
Collaborator Author

@raftaar1191

  1. Resolved
  2. I think we store user_id when we create in a comment in the old and new comment table. You will see user_id 0 for comments which done by code instead of a real user. for example, we add a comment when donation status changes.
  3. Create a separate issue for refactor(comment): create custom comment table #3627 #3659 (comment)

@raftaar1191
Copy link
Contributor

@ravinderk PR looks good for me everthing seem working fine and great

It ready for merge

@DevinWalker DevinWalker merged commit 59b5b13 into release/2.3.0 Sep 14, 2018
@DevinWalker DevinWalker deleted the issue/3627 branch October 12, 2018 18:39
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

Successfully merging this pull request may close these issues.

None yet

3 participants