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
Bug report: private messaging
Avatar
Blaise
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Mar 24, 2020 - 10:12 am

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 \xc3\xa9t\xc3\xa9 selectionn\xc3\xa9";}' WHERE id=2250651' at line 1 pour la requ\xc3\xaate UPDATE wp_tpf_sftrack SET notification = 'a:2:{i:0;i:1;i:1;s:41:"Aucun destinataire n'a \xc3\xa9t\xc3\xa9 selectionn\xc3\xa9";}' 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

Avatar
SP Community Support
SP Moderator
sp_UserOfflineSmall Offline
Mar 25, 2020 - 4:36 pm

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 \xc3\xa9t\xc3\xa9 selectionn\xc3\xa9″;}’ 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.

Avatar
Blaise
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Mar 31, 2020 - 12:51 pm

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.

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: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626