Support Forum

Bug report: private messaging

BL Blaise
Blaise
Member

Hi,

When a user composes a private message but does not add a recipient he gets a popup “Database error”. The message is not saved. The window is closed and returns to the list of PM.

Also this generates an SQL error in the server logs:

Database error. WordPress You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘a xc3xa9txc3xa9 selectionnxc3xa9″;}’ WHERE id=2250651′ at line 1 pour la requxc3xaate UPDATE wp_tpf_sftrack SET notification = ‘a:2:{i:0;i:1;i:1;s:41:”Aucun destinataire n’a xc3xa9txc3xa9 selectionnxc3xa9″;}’ WHERE id=2250651 faite par do_action(‘wp_ajax_pm-post’), WP_Hook->do_action, WP_Hook->apply_filters, sp_pm_ajax_post, require_once(‘/sp-resources/forum-plugins/private-messaging/ajax/sp-pm-ajax-post.php‘), sp_pm_save_message, spcNotifications->message, spcDB->update, spcDB->execute, QM_DB->query,

 

Obviously this is not good: I would rather the user be warned that he forgot a recipient and that he can simply add the recipient and send his PM. As is today he loses his PM.

Thanks and good luck

2 Answers

New Answer

SS SP Community Support
SP Community Support
Admin

We’re unable to reproduce this database error.  We do show a message about no recipients entered (though you do lose the message). Can you let us know what the following versions of components are?

  • Simple:Press Forums Plugin
  • WordPress
  • Simple:Press Private Messaging plugin
  • MariaDB

The section referenced in the error message  ‘a xc3xa9txc3xa9 selectionnxc3xa9″;}’ seems like a partial serialized array which is weird – there might be something in the database that is corrupted.  What happens if you log in as a different user and try to send a PM without a recipient? 

Thanks.

BL Blaise
Blaise
Member

Hi,

Yes: different user (non admin) and same error.

  • Simple:Press Forums Plugin: 6.5.1
  • WordPress: 5.3.2
  • Simple:Press Private Messaging plugin 3.3.0
  • MariaDB: my sql 5.5.5

Also PHP 7.3.16

It’s not serialised array: this is a conversion of French accents. The string is a été selectionné and it’s translated in the logs like that.

If you let me know in which file the “UPDATE” request in the error message is done I will try to debug this for you.