"Send PM" button on post / profile not working

3 Nov 2019
#1
This issue is marked as solved
When trying to send PM to a user by clicking on "Send pm" in forum post or in profile.
Link redirect to correct url
private.php?action=send&uid=1

But uid is "undefined" in the new conversation recipient.
This error is also happening on mybboost.

Best answer

Shade 31 Mar Edited
Got some time and implemented a simple yet efficient fix for this, which is now live on MyBBoost. Will be rolled out with beta 3. If you want to apply the patch to beta 2, open inc/plugins/symposium.php, find the function symposium_private_send_start and add under $uid = (int) $mybb->get_input('uid'); the following piece of code:

// Redirect to appropriate conversation if existing
    
$convid get_conversation_id($mybb->user['uid'], $uid);

    
$query $db->simple_select('symposium_conversations''uid'"uid = {$mybb->user['uid']} AND convid = '" $db->escape_string($convid) . "'");
    if (
$db->fetch_field($query'uid')) {
        
header('Location: private.php?action=read&convid=' $convid);
        exit;
    } 
In order to test this feature, click on the Message button on the new hovercards on usernames.

All replies

Aristide Chypre 3 Nov 2019
#2
Oops my bad, it is working anyway (but I thought the first time sending the message wasn't working o.O)
RocketFoot 4 Nov 2019
#3
This is a noted bug that Shade said will be fixed in the next Beta...I noticed the same thing on my forum when I tested it.
Shade 4 Nov 2019
#4
This should be actually working in beta 2 as long as select2's option "multiple" is set to true; it's not here due to styling reasons. A definitive fix (which implies "multiple" to be always true) will be carried out in beta 3 which will support multiple participants in a single chat.
Omnipotent 17 Feb
#5
This should be actually working in beta 2 as long as select2's option "multiple" is set to true; it's not here due to styling reasons. A definitive fix (which implies "multiple" to be always true) will be carried out in beta 3 which will support multiple participants in a single chat.
Shade (4 Nov 2019)
Any ETA for Beta 3?
Also on this, when you click Send PM on profiles/posts it should take you to an existing conversation if you indeed have one? Maybe this would be too complicated but it's just a suggestion instead of giving people the new conversation screen over and over.
Shade 17 Feb
#6
There is no ETA, as university commitments are quite unpredictable. Till end of February all development is halted, then I will see what I can do.
Shade 31 Mar Edited
#7
Got some time and implemented a simple yet efficient fix for this, which is now live on MyBBoost. Will be rolled out with beta 3. If you want to apply the patch to beta 2, open inc/plugins/symposium.php, find the function symposium_private_send_start and add under $uid = (int) $mybb->get_input('uid'); the following piece of code:

// Redirect to appropriate conversation if existing
    
$convid get_conversation_id($mybb->user['uid'], $uid);

    
$query $db->simple_select('symposium_conversations''uid'"uid = {$mybb->user['uid']} AND convid = '" $db->escape_string($convid) . "'");
    if (
$db->fetch_field($query'uid')) {
        
header('Location: private.php?action=read&convid=' $convid);
        exit;
    } 
In order to test this feature, click on the Message button on the new hovercards on usernames.
Seeker-Smith 15 May
#8
Hi Shade
I've tried this patch a couple times and it does not work for me. Any idea's?
Shade 15 May
#9
I will release the new beta in the upcoming days, I've just finished my last exam and I have a couple days of rest.
Hüseyin Filiz likes this post
ProX 13 Aug
#10
Got some time and implemented a simple yet efficient fix for this, which is now live on MyBBoost. Will be rolled out with beta 3. If you want to apply the patch to beta 2, open inc/plugins/symposium.php, find the function symposium_private_send_start and add under $uid = (int) $mybb->get_input('uid'); the following piece of code:

// Redirect to appropriate conversation if existing
    
$convid get_conversation_id($mybb->user['uid'], $uid);

    
$query $db->simple_select('symposium_conversations''uid'"uid = {$mybb->user['uid']} AND convid = '" $db->escape_string($convid) . "'");
    if (
$db->fetch_field($query'uid')) {
        
header('Location: private.php?action=read&convid=' $convid);
        exit;
    } 
In order to test this feature, click on the Message button on the new hovercards on usernames.
Shade (31 Mar)
So this is only supposed to be moving you to the conversation if it exists, but still showing undefined for non existent conversations.