Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Private Message system bugs: PM count not refreshing & messages sorting & slow when lots of PMs
Avatar
sptab
Member
sp_UserOfflineSmall Offline
Oct 23, 2013 - 3:21 am

Hello,

Here are three problems I am experiencing with SP Private Message system, all are unrelated I believe.

1. PM count isn't refreshing.

Every new message received appears in the PM box but the PM number counter (ex: Inbox: 88) does not decrease when PM are read. As a result, the message number is now just increasing and I have no way to get it back to zero and know about just the real number of new messages.

2. Sorting of message list in the Inbox
The new messages received actually appear at the top of the PM list which is fine, but replies on older messages do not get bumped to top, so they can easily be missed when old messages are replied.
 
3. PM system is real slow when there are a lof of messages
I am keeping all messages (Inbox and Sent) in the PM system, which probably represents a few hundreds messages (that's a year and half of communication with the members in my forum). The system is really slow to display the PMs when I click on Inbox link or when I send a PM. I tested on an almost empty account and the system speed is just good so I believe the problem is related to the number of messages there, I hope this could be optimized. If needed I don't mind having a "light" view of my PMs to speed up things and another view with all messages for when I need to see everything.
 

The first two issues appeared a few months ago, as far as I can remember I think it was just fine before. The only unusual thing that comes to my mind is I upgraded the PM plugin quite late and used the old one (the one that has a completely different layout) for a long time. I wonder if this created an issue in the database or something like that.

All my software is up to date, versions: WP 3.6.1, SP 5.3.4, all SP plugins are up to date (PM plugin=2.0.7)

Thank you.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 23, 2013 - 10:32 am

as to counts, thus far cannot duplicate...  are you seeing any errors in the browser console when you read messages? when a thread is loaded, every message in the thread is marked read and the count should be decreased..

same on #2 - cannot duplicate...  one of the early 2.0.x versions was an explicit release that corrected this problem...  have not seen it since or has it been reported again before now...  is this any reply you receive to a message or just some?

well of course, it will be slower if you have hundred of pms, but that would just be loading of inbox.. not sure how sending a pm would be slower once its loaded...  or are you really still just referring to the inbox load time

Avatar
sptab
Member
sp_UserOfflineSmall Offline
Oct 23, 2013 - 10:45 am

#1 I'll haven't yet checked the javascript console for errors, I will have a look and report.

#2 I think it's all of them, at least I've noted the problem on 5 or so replies from the last weeks.

#3: What I referred to sending a PM is the whole process, that actually refreshes the PM page and reloads the whole Inbox afterwards which takes ~1m15s for the hundreds of messages in my inbox. Having the Inbox optimized or getting an archive folder where messages from the Inbox could be moved and would be loaded only on demand in the PM system would be nice to have.

 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 23, 2013 - 11:12 am

an archive box of some sort is what came to mind for me too, but still complex to implement...

can you check something else? when on the inbox page, how many threads do you see listed in the pm quicklinks?  and does its order follow the thread order in the inbox?

Avatar
sptab
Member
sp_UserOfflineSmall Offline
Nov 2, 2013 - 7:10 am

Hello,

I just checked part of the "private-messaging" plugin source code and I noticed the read_status is used when sorting the list of PM thread, so I realize the fact this is not working for me (problem #1) impacts the list of sorted messages in the Inbox (problem #2). Until a better solution comes out, I'll probably update the read_status by hand so at least I get proper thread ordering and PM count in my Inbox.

I am having some troubles to get a clear understanding of JS console errors when viewing messages. I'm accepting any help if you want to check on my forum.

I haven't counted precisely the number if threads in the pm quicklinks, it's like 30 of them. It seems the height of the list is limited by the window size and I noticed that the last 10 threads at the bottom of the list don't have the sp_QLBalloonBlue.png (sp_QLBalloonBlue.png) logo next to them. The order of the threads there is the same as in the PM list.

 

Thank you for your help.

 

Edit: I just ran this query to set all admin PMs as read.

UPDATE wp_sfpmrecipients set read_status=1 WHERE user_id=1;

Actually, the PM count is now correct showing Inbox: 0, but the list of threads in the Inbox is still not showing in the correct order as I was expecting.

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 2, 2013 - 8:26 am

So as far as #1 goes it sounds like Steve probably nailed it when he said that the read_status is not getting updated when you read a PM (thread). So yes - need to look in the console. Basically have the console set to show script errors and probably nothing else. Run the system and see what pops up in the console. Copy and paste the result to this thread.

The balloon beside a PM in the QuickLinks has exactly the same purpose as the main forum QuickLinks in that it shows a thread with a new post. No balloon - no new post in that thread.

I will need to check the code and check with Steve but I think the sort order of PM threads is like forum topics. The one with the most recent activity is the one at the top etc... Does this not tally with what you are seeing?

andy-signature.png
YELLOW
SWORDFISH
Avatar
sptab
Member
sp_UserOfflineSmall Offline
Nov 20, 2014 - 7:05 am

Hello,

I am glad that SP team is planning to add the necessary features in the PM system as listed in these tickets:

- 0004028: [General] add pagination to pm inbox threads
- 0004580: [General] folders support
- 0004579: [General] Sorting options for inbox

Hopefully developement will happen in a not too far future, I did request similar things about a year ago.

 

Also, about David's comments above:

David Norman said [...]

My PM inbox by these individual criteria: latest mail received; forum member. This would make it easier for me to see when different members reply to my PMs and how long ago, and which are active conversations I am having.

My PM Inbox contains about 3000 messages and it's not easy to work with, specially with current sorting criteria. 

As for improving current thread sorting in the Inbox, I made a small fix to sort by "Received" date, so old PM threads getting a recent reply get bump at the top of the PM thread list.

I changed the following file private-messaging/library/sp-pm-threads-class.php in the plugins dir:

Changing line:

$spdb->orderby = 'read_status ASC, thread_id DESC, message_id DESC';

to 

$spdb->orderby          = 'read_status ASC, sent_date DESC, thread_id DESC, message_id DESC';

 

I am interested in SP team opinion on such change and if it make sense, maybe it can be considered to be adopted as default sort criteria in future PM plug-in update.

 

Cheers.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Nov 20, 2014 - 9:10 pm

I too would like to see some of the enhancements - just a matter of bodies and time! ;)

as to your ordering, I would need to try it out to give an honest opinion and make sure no knocks, but on the surface, seems to make sense...  we sort by thread id since they tend to be date ordered as well, but I can see where a newer message in an older thread could bubble up higher...

will talk it over and try it out to see how it goes...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17363
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625