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
Content of Private Message Not Displaying
Avatar
jbaldwin
Member
Free Members
sp_UserOfflineSmall Offline
May 1, 2014 - 8:34 am

Good Morning,

I'm having an issue with Private Messaging.  For some reason the content of each message is not displaying.  Several of the members are displaying as Guest and they are not since they have an account.  Not sure what's going on here.  

Any suggestions would be very appreciated.  

Thanks, Jody 

pm_not_displaying.PNGImage Enlarger

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 1, 2014 - 12:40 pm

Well the most curious thing here is that the three 'empty' messages are all labelled as being sent by a 'Guest'. Yet non-registered users should not be able to access PMs. Can you shed any light on that for me - see if I can replicate this...?

andy-signature.png
YELLOW
SWORDFISH
Avatar
jbaldwin
Member
Free Members
sp_UserOfflineSmall Offline
May 1, 2014 - 2:08 pm

That is what is odd because everyone that responded is a registered member.  I ran the following query to review the data in MySQL:

SELECT m.*, display_name FROM `wp_sfpmmessages` as m JOIN wp_sfmembers as u ON m.user_id = u.user_id WHERE thread_id = 2976

Below are the results (exported in CVS) that I get:

Capture.JPGImage Enlarger

I'm at a lose as to why this would happen...

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 1, 2014 - 3:33 pm

Most strange.

As you are a SQL man could you try this query below? This is basically what is run to populate a thread.

I have set table prefix to 'wp_' and you will need to replace the thread ID (XXXX)  with your thread (which I now see is 2976). Am interested to see if you get the correct members showing up in the results.

SELECT wp_sfpmrecipients.thread_id, wp_sfpmmessages.user_id AS sender, mem1.display_name AS sender_display_name, wp_sfpmrecipients.user_id AS recipient, mem2.display_name AS recipient_display_name, wp_sfpmrecipients.message_id, read_status, pm_type, sent_date, attachment_id, title, message_count, thread_slug, message 
FROM wp_sfpmrecipients 
JOIN wp_sfpmmessages ON wp_sfpmrecipients.message_id = wp_sfpmmessages.message_id 
JOIN wp_sfpmthreads ON wp_sfpmrecipients.thread_id = wp_sfpmthreads.thread_id 
JOIN wp_sfmembers AS mem1 ON wp_sfpmmessages.user_id = mem1.user_id 
JOIN wp_sfmembers AS mem2 ON wp_sfpmrecipients.user_id = mem2.user_id WHERE wp_sfpmrecipients.thread_id = XXXX 
ORDER BY sent_date ASC
andy-signature.png
YELLOW
SWORDFISH
Avatar
jbaldwin
Member
Free Members
sp_UserOfflineSmall Offline
May 1, 2014 - 3:56 pm

I just run the query and the sender_display_name and recipient_display_name are both populated with the correct names.  If you need me to upload the results just let me know.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 2, 2014 - 12:49 am

no caching plugins, right?

perhaps you can make a quick edit to the spPMMessagesView.php file (its in sp-resources/forum-plugins/private-messaging/template-files

around line 30, after

            $spPmMessageList = new spPmMessageList($spVars['thread']);

lets go ahead and add

ashow(spPmMessageList);

and see what is reported in a blue box when you load up the thread... that will be what is actually loaded form the db... a starting place for debugging if you will...

Avatar
jbaldwin
Member
Free Members
sp_UserOfflineSmall Offline
May 2, 2014 - 9:23 am

Correct, no caching plugins installed.  I updated spPMMessagesView.php as requested but no additional data was displayed when I opened the thread.  I check in Chrome, Firefox and IE and deleted my browser cache as well.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 2, 2014 - 9:41 am

are you sure you changed the actual sp theme you are using? not at computer to check my code, but it should output info on the thread... be sure you are viewing the actual pm thread (list of messages) not the inbox (list of threads)...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 2, 2014 - 9:42 am

and to be sure, the code should be:

ashow($spPmMessageList);

Avatar
jbaldwin
Member
Free Members
sp_UserOfflineSmall Offline
May 2, 2014 - 2:11 pm

I must not have been fully awake this morning!  I have updated the code and this is what I get:

Capture-1.JPGImage Enlarger

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