User's page – comments invoice tabs/results

This topic contains 31 replies, has 3 voices, and was last updated by  Giri 6 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #110

    m forbes
    Full Member
    Post count: 338

    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.

    #119

    Giri
    Expired Member
    Post count: 3155
    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.

    It seems like it includes unpublished comments too. I’ll make it to display only the published comments. Thanks for reporting.

    #120

    m forbes
    Full Member
    Post count: 338

    thanks! 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!

    #122

    m forbes
    Full Member
    Post count: 338

    Continuing 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 :).

    #129

    Giri
    Expired Member
    Post count: 3155

    Hi,

    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.

    #144

    m forbes
    Full Member
    Post count: 338

    Urgg, 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!

    #153

    Giri
    Expired Member
    Post count: 3155

    Thanks, 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

    #158

    m forbes
    Full Member
    Post count: 338

    Hey 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?

    #159

    Giri
    Expired Member
    Post count: 3155

    Hi 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

    #183

    m forbes
    Full Member
    Post count: 338

    Thanks 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 :)???

    #199

    Giri
    Expired Member
    Post count: 3155

    Can you post your website url and wp-admin details.?

    I’ll take a look.

    Thanks

    #200

    m forbes
    Full Member
    Post count: 338
    This reply has been marked as private.
    #202

    Giri
    Expired Member
    Post count: 3155
    This reply has been marked as private.
    #205

    m forbes
    Full Member
    Post count: 338
    This reply has been marked as private.
    #207

    m forbes
    Full Member
    Post count: 338
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 32 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket