vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Please Help! Unread counter jumps always back to 1 (https://vborg.vbsupport.ru/showthread.php?t=310159)

Wolver2 04-03-2014 12:50 PM

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,

Seven Skins 04-03-2014 05:51 PM

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.



.

Wolver2 04-04-2014 07:06 AM

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

Lynne 04-04-2014 05:22 PM

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.

Wolver2 04-05-2014 01:10 PM

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?

ozzy47 04-05-2014 02:22 PM

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
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.

Wolver2 04-09-2014 08:54 AM

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

cellarius 04-09-2014 12:02 PM

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!

Wolver2 04-14-2014 03:59 PM

I think diddnt work completely @ozzy47

USERID X20Xwas updated!
USERID X00X was updated!

There are around 30 but only showing is 2

ozzy47 04-15-2014 12:55 AM

So there is users still users reporting the issue?


All times are GMT. The time now is 10:13 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
  • Page Generation 0.01209 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete