Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-03-2014, 12:50 PM
Wolver2 Wolver2 is offline
 
Join Date: Oct 2010
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Please Help! Unread counter jumps always back to 1

A user spammed by making several Private messages and added a link to a virus to it!

So in panic i quickly deleted all the data inside mysql manually..

Now the issue:
I have is it shows 1 unread message for those who recieved the PM but did not open..


I know there is some kind of PM read counter... so I tried to set in the specific userid table unread to 0

But after he recieves a new pm it goes back to "unread 1" even if read..

Are there more fields to edit?

--------------- Added [DATE]1396536019[/DATE] at [TIME]1396536019[/TIME] ---------------

Seems like there are several Tables for Private Messages...

User, pm, pmtext, pmreceipt,
Reply With Quote
  #2  
Old 04-03-2014, 05:51 PM
Seven Skins's Avatar
Seven Skins Seven Skins is offline
 
Join Date: Sep 2008
Location: London, UK
Posts: 1,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you are deleteing all PM's you may run the queries below.

Code:
TRUNCATE `pm`;
TRUNCATE `pmtext`;
TRUNCATE `pmreceipt`;
UPDATE `user` SET `pmtotal` = '0';
UPDATE `user` SET `pmunread` = '0';


Backup database etc... as running wrong queries may cause serious issues.



.
Reply With Quote
  #3  
Old 04-04-2014, 07:06 AM
Wolver2 Wolver2 is offline
 
Join Date: Oct 2010
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the reply Seven Skins, I dont want to delete all PMs

I just want that it wont show wrong unread messages...

As it shows for several 1 unread message even if there is no unread msg
Reply With Quote
  #4  
Old 04-04-2014, 05:22 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, he listed all the tables you would have had to modify if you chose to delete a PM via the database instead of via the built-in method in vbulletin. The user table is what keeps track of the total number of unread PMs.
Reply With Quote
Благодарность от:
Max Taxable
  #5  
Old 04-05-2014, 01:10 PM
Wolver2 Wolver2 is offline
 
Join Date: Oct 2010
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Lynne, I diddnt know that there was a built in way to delete PMs via admin panel. I guess i reacted out of panic..

What I did:

1. I deleted the PMs in the table pmtext (rows)
2. In table user I changed the fields of "pmunread" from 1 to 0 for that specific user and "pmtotal" from 10 to (minus 1) = 9

It works at first, but once they receive a new PM and user reads it vbulletin brings back the old issue "showing 1 unread message" (cause of the PM i deleted inside mysql manually)

Is there something i need to delete as well? or is it some cache which always brings the issue back?
Reply With Quote
  #6  
Old 04-05-2014, 02:22 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK lets try this.
1) Make a backup of your site. ( this is not tested on a global scale, only on a test site )
2) Upload the attached file to your admincp folder.
3) Then enter this URL in your browser:

Code:
http://www.YOURSITE.com/admincp/pm_counter_fix.php
Make sure you replace, http://www.YOURSITE.com with the URL to your site, and admincp with your admincp folder if you have renamed it.

And then let me know if that works.
Attached Files
File Type: php pm_counter_fix.php (2.2 KB, 5 views)
Reply With Quote
  #7  
Old 04-09-2014, 08:54 AM
Wolver2 Wolver2 is offline
 
Join Date: Oct 2010
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks ozzy47

May I ask a manual way of the script u made? As I am very scared that I mess things up with the test script wished it was globally tested hehe
Reply With Quote
  #8  
Old 04-09-2014, 12:02 PM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The chance of you messing things up when entering complex database queries yourself as opposed to runningt that script is higher, I would say. And of course, either way, you absolutely need to have a database backup before doing anything!
Reply With Quote
  #9  
Old 04-14-2014, 03:59 PM
Wolver2 Wolver2 is offline
 
Join Date: Oct 2010
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think diddnt work completely @ozzy47

USERID X20Xwas updated!
USERID X00X was updated!

There are around 30 but only showing is 2
Reply With Quote
  #10  
Old 04-15-2014, 12:55 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So there is users still users reporting the issue?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:24 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04922 seconds
  • Memory Usage 2,272KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete