Error when deleting messages

17 Nov
This issue is marked as solved
Thank you for the beautiful plugin.

I'm getting an error when selecting individual messages and deleting them:
"The server returned a malformed response. A raw representation of the response is available in your browser's console. Please report it to an administrator."

Furthermore, the console reads:
SyntaxError: Unexpected token < in JSON at position 0
at Function.parse [as parseJSON] (<anonymous>)
at Object.complete (symposium.js?v=0.3:127)
at c (jquery.js?ver=1821:2)
at Object.fireWith (jquery.js?ver=1821:2)
at l (jquery.js?ver=1821:2)
at XMLHttpRequest.<anonymous> (jquery.js?ver=1821:2)

Upon a manual refresh of the page, the messages are indeed deleted; I'm just having a small hiccup with the process.

Best answer

Shade 17 Nov
Do you have SQL strict mode enabled?

All replies

Shade 17 Nov
Please retrieve your error.log file and send it to me (either here or in PM), thanks.
tomnjerry74 17 Nov
It seems as though "lastpmid" is empty and causing an SQL error.

<friendly_type>MyBB SQL Error</friendly_type>
<message>SQL Error: 1366 - Incorrect integer value: '' for column `hidden`.`mybb_symposium_conversations`.`lastpmid` at row 1
UPDATE mybb_symposium_conversations
SET `lastmessage`=':) test', `lastpmid`='', `lastuid`='1', `lastdateline`='1605597640', `lastread`='1605598697' WHERE convid = '1938fj9283f4328904802334' AND uid = 1
<back_trace> errorHandler->error() called at [/inc/db_mysqli.php:597]
#1 DB_MySQLi->error() called at [/inc/db_mysqli.php:337]
#2 DB_MySQLi->query() called at [/inc/db_mysqli.php:370]
#3 DB_MySQLi->write_query() called at [/inc/db_mysqli.php:944]
#4 DB_MySQLi->update_query() called at [/inc/plugins/symposium.php:1785]
Flyover 2.4 update_conversations_meta() called at [/inc/plugins/symposium.php:1684]
Drafts AutoSave 1.1 symposium_xmlhttp() called at [/inc/class_plugins.php:142]
ACP warning pluginSystem->run_hooks() called at [/xmlhttp.php:205]

This is the only error in the log.
Shade 17 Nov
Do you have SQL strict mode enabled?
tomnjerry74 17 Nov
Do you have SQL strict mode enabled?
Shade (17 Nov)
Yes, I did. Turning it off worked perfectly. Thank you for your help!