Support Forum
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
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.
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.
1 Guest(s)