![]() |
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, |
If you are deleteing all PM's you may run the queries below.
Code:
TRUNCATE `pm`; Backup database etc... as running wrong queries may cause serious issues. . |
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 |
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.
|
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? |
1 Attachment(s)
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 And then let me know if that works. |
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 |
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!
|
I think diddnt work completely @ozzy47
USERID X20Xwas updated! USERID X00X was updated! There are around 30 but only showing is 2 |
So there is users still users reporting the issue?
|
yes yes only 2 got fixed.. @ozzy47
there are 30 more with the issues (reported) |
Have no idea what else I can do to fix this issue :)
|
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? |
Why not delete pms from admincp/users/Private Message Statistics
|
@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 |
Are you actually checking the pm tables to verify the numbers you are changing the user fields to? That is what vbulletin looks at.
|
I am trying to understand the PM Table... @Lynne
So I have to find out the PM ID of the PM's he sent.. after that I just delete the entire row of it? |
As posted in a previous post, there are several tables that are effected everytime a user makes a PM. You need to go through them all if you want to change anything.
|
All times are GMT. The time now is 07:20 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|