wpsharks / comment-mail

A WordPress plugin enabling email subscriptions for comments.
http://comment-mail.com
GNU General Public License v3.0
8 stars 3 forks source link

Edit Subscription: comment not shown in Comment ID list #257

Open IvanRF opened 8 years ago

IvanRF commented 8 years ago

A user is subscribed to "all comments", and I want to edit the subscription to "only replies to his comment". However, I'm not able to select the comment made by the user. It is not in the list.

User comment id is 1654 and the author is Antonio.

Screenshots: 9-3-2016 9-19-12 p- m-

Comments table for the post: 9-3-2016 9-20-55 p- m-

Search by comment id: 9-3-2016 9-25-56 p- m-

IvanRF commented 8 years ago

I just saw this does not happen for an unconfirmed subscription. That is, I can select its own comment when the subscription is unconfirmed, but not if it is subscribed.

@raamdev is it possible this is a design decision?

raamdev commented 8 years ago

I just tested this and I was able to switch a user from All Comments to Replies Only by selecting their own comment (the comment did show up). Also, the user was subscribed not unconfirmed.

IvanRF commented 8 years ago

@raamdev you're right, I just tested it with a different user and his comment is shown.

The issue is different, is that comment id (1654) which is never shown, for any user. I use W3TC, I just cleaned my Database and Object cache in case that was messing things, but that comment is still not showing. I will look in the DB if there is something odd.

IvanRF commented 8 years ago

@raamdev I just manually set the comment in the DB, and it is shown in the table but not when I enter Edit Subscription. Could you point me to the DB query in the code for the list in the "Comment ID #" list?

10-3-2016 10-54-11 a- m-

10-3-2016 10-55-10 a- m-

raamdev commented 8 years ago

This builds the select option: https://github.com/websharks/comment-mail/blob/160213/comment-mail/includes/classes/utils-markup.php#L433-L540

This fetches comments for a given post ID from the database: https://github.com/websharks/comment-mail/blob/160213/comment-mail/includes/classes/utils-db.php#L586-L676