User's page – comments invoice tabs/results
This topic contains 31 replies, has 3 voices, and was last updated by Giri 7 years, 3 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
July 29, 2017 at 4:20 am #110
Hi again!
Cont. on Resolved topic: https://userswp.io/support/topic/userswp-missing-info-on-users-page-and-a-few-other-oddities/
I updated via UsersWP and the comment count is still off (shows 6 comments, but there is only 1), and there is nothing under invoices, even though there are 6 invoices under this acct.
I know you applied a patch to the site regarding not showing invoices (7-19), and it worked for a few days but is showing 0, though there are 6.
Thank you.
July 29, 2017 at 5:12 pm #119I updated via UsersWP and the comment count is still off (shows 6 comments, but there is only 1), and there is nothing under invoices, even though there are 6 invoices under this acct.
It seems like it includes unpublished comments too. I’ll make it to display only the published comments. Thanks for reporting.
July 29, 2017 at 7:50 pm #120thanks! And, to be fair, what is really weird is that under comments, it is showing 7 approved, but I have only written 1 comment total, and that one comment is the only one that shows in backend. So I deleted the one comment, now showing 6 approved but there are none! So, it looks like it’s not UsersWP. do you know how I can get rid of this???
Attached ss.
Any idea on the invoices not showing?
Thanks so much for all that you do!
July 29, 2017 at 10:00 pm #122Continuing on on my post above. I am in database, looking at wp-comments, and I am looking at comments in reference to invoices. Is this correct? I am seeing 6, and the one actual comment that I deleted, shows it’s in trash. This explains the 6 under comments and 0 under invoices.
In table wp_geodir_comments_reviews, it shows nothing, though the 1 comment (under comments) is a review. Is this correct? I restored the one comment that has been amde to see if it populates under this table, did not
Am I driving you nuts yet :)??? I’m trying to trouble shoot but not getting very far :).
July 31, 2017 at 12:27 pm #129Hi,
Like I mentioned earlier the count also includes unpublished comments. I modified the code.
So now the count uses only the approved comments.
If you want you can replace this function with the following code.
https://github.com/UsersWP/userswp/blob/master/includes/helpers.php#L68
function uwp_comment_count($user_id) { global $wpdb; $count = $wpdb->get_var(' SELECT COUNT(comment_ID) FROM ' . $wpdb->comments. ' WHERE user_id = "' . $user_id . '" AND comment_approved = "1" AND comment_type NOT IN ("pingback", "trackback" )' ); return $count; }
Let me know if that fixes your issue.
August 1, 2017 at 7:26 pm #144Urgg, I wrote out this whole thing yesterday and must have not posted it!! So here goes again…
Thank you for your continued support, I am trying to understand…
I deleted the only comment that had been approved, in fact, the only comment on a listing that there is/was. I am still showing 6 comments approved at back end under “comments”, but there are none showing. (screenshot attached)
If I look in the database, under table wp_comments, I am seeing reference to invoices. (screenshot attached)
I have 6 invoices under this subscriber acct. and 0 are showing under the Invoices tab in the user area. Where as, they seem to be showing under comments? (screenshot attached). I have a user menu added in the user area. The invoices link shows the invoices there but it is a different url for this…
Am I confusing you :)?
I am going to delete all invoices and start over, but wanted some clarity on this first.
Thank you so much!
August 2, 2017 at 4:18 pm #153Thanks, Just discussed with stiofan. You are right. Invoicing addon uses wp_comments table for activity.
You can replace the following line in my above code
AND comment_type NOT IN ("pingback", "trackback" )'
with
AND comment_type NOT IN ("pingback", "trackback", "wpinv_note" )'
Thanks
August 2, 2017 at 11:21 pm #158Hey Giri, Thank you!
Question, will this be updated in next version? Do I put the code you gave in my functions file? If so, and it is to be updated in next UsersWP version, will it matter if code is left in functions?
August 3, 2017 at 10:51 am #159Hi Don’t put that in any functions file.
Duplicate functions will cause fatal errors.
So you must either replace that function or wait till next version.
Yes this will be updated in the next version.
Thanks
August 4, 2017 at 8:37 pm #183Thanks Giri, I edited the file and COMMENTS look correct now, BUT I am still not seeing any invoices under INVOICES. Any ideas? Is no one else having these issues :)???
August 7, 2017 at 1:24 pm #199Can you post your website url and wp-admin details.?
I’ll take a look.
Thanks
August 7, 2017 at 7:24 pm #200This reply has been marked as private.August 9, 2017 at 10:57 am #202This reply has been marked as private.August 9, 2017 at 7:19 pm #205This reply has been marked as private.August 13, 2017 at 11:32 pm #207This reply has been marked as private. -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket