Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 03 Apr 2014, 13:50
Wolver2 Wolver2 is offline
 
Join Date: Oct 2010
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 03 Apr 2014 at 14:40 ---------------

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

User, pm, pmtext, pmreceipt,
Reply With Quote
  #2  
Old 03 Apr 2014, 18:51
Seven Skins's Avatar
Seven Skins Seven Skins is offline
 
Join Date: Sep 2008
If you are deleteing all PM's you may run the queries below.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



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



.
Reply With Quote
  #3  
Old 04 Apr 2014, 08:06
Wolver2 Wolver2 is offline
 
Join Date: Oct 2010
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 Apr 2014, 18:22
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #5  
Old 05 Apr 2014, 14:10
Wolver2 Wolver2 is offline
 
Join Date: Oct 2010
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?

Last edited by Wolver2; 05 Apr 2014 at 14:15.
Reply With Quote
  #6  
Old 05 Apr 2014, 15:22
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Real name: Chris
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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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, 4 views)
__________________
You can get access to my 180 mods for vB 3.6 - 4.x at The Admin Zone as well as the professional support you are used to. New vBulletin Spider Definitions, vBulletin Spiders List Hits 1000 Spiders! ​ OzzModz down. Site has had a data breach, checking how the intrusion happened. Change your PW if you use the same one on my site and others.
Reply With Quote
  #7  
Old 09 Apr 2014, 09:54
Wolver2 Wolver2 is offline
 
Join Date: Oct 2010
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 09 Apr 2014, 13:02
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Real name: Sven
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!
__________________
Please note that there will be no further updates to my addons, especially they will not be upgraded for vB5. I'm leaving vB, since IB choose to go the banana-way yet again.

http://www.roma-antiqua.de
Reply With Quote
  #9  
Old 14 Apr 2014, 16:59
Wolver2 Wolver2 is offline
 
Join Date: Oct 2010
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 15 Apr 2014, 01:55
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Real name: Chris
So there is users still users reporting the issue?
__________________
You can get access to my 180 mods for vB 3.6 - 4.x at The Admin Zone as well as the professional support you are used to. New vBulletin Spider Definitions, vBulletin Spiders List Hits 1000 Spiders! ​ OzzModz down. Site has had a data breach, checking how the intrusion happened. Change your PW if you use the same one on my site and others.
Reply With Quote
  #11  
Old 16 Apr 2014, 14:44
Wolver2 Wolver2 is offline
 
Join Date: Oct 2010
yes yes only 2 got fixed.. @ozzy47

there are 30 more with the issues (reported)
Reply With Quote
  #12  
Old 18 Apr 2014, 01:54
Wolver2 Wolver2 is offline
 
Join Date: Oct 2010
Have no idea what else I can do to fix this issue
Reply With Quote
  #13  
Old 18 Apr 2014, 02:45
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Go to your database backup and delete them correctly?

Or, get the list of userids that need to be fixed and query the database for the correct number of pms and insert them into the database manually?
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #14  
Old 18 Apr 2014, 03:24
ForceHSS's Avatar
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Why not delete pms from admincp/users/Private Message Statistics
Reply With Quote
  #15  
Old 25 Apr 2014, 13:30
Wolver2 Wolver2 is offline
 
Join Date: Oct 2010
@Lynne Do you mean this:

I already tried changing the correct numbers of PM's

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

But then Vbulletin changes it back to pmunread to 1 after user receives a new pm and reads it. It always comes back.. I dont know why lol.. is there some cache..?

@ForceHSS

I was in panic and diddnt know about deleting via that way.. I usually research first but was sadly in panic.. and diddnt want anyone to open the PMs with virused links

Last edited by Wolver2; 25 Apr 2014 at 13:41.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 16:29.

Layout Options | Width: Wide Color: