XF 1.5 Must create a first message DW on insert


Well-known member

While this is related to an add-on, I'm still asking because this error never appeared when running 1.4:

Error Info
XenForo_Exception: Must create a first message DW on insert. - library/XenForo/DataWriter/ConversationMaster.php:250
Generated By: xxxxxxx, Yesterday at 12:25 AM
Stack Trace
#0 /var/www/html/library/LiamW/xxxxxxxxxxxx/Extend/DataWriter/ConversationMaster.php(23): XenForo_DataWriter_ConversationMaster->_preSave()
#1 /var/www/html/library/XenForo/DataWriter.php(1446): LiamW_xxxxxxxxxxx_Extend_DataWriter_ConversationMaster->_preSave()
#2 /var/www/html/library/XenForo/DataWriter.php(1385): XenForo_DataWriter->preSave()
#3 /var/www/html/library/XenForo/DataWriter/ConversationMessage.php(155): XenForo_DataWriter->save()
#4 /var/www/html/library/XenForo/DataWriter.php(1409): XenForo_DataWriter_ConversationMessage->_postSave()
#5 /var/www/html/library/XenForo/ControllerPublic/Conversation.php(1130): XenForo_DataWriter->save()
#6 /var/www/html/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_Conversation->actionInsertReply()
#7 /var/www/html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /var/www/html/index.php(13): XenForo_FrontController->run()
#9 {main}
Request State
array(3) {
  ["url"] => string(70) "http://www.mysite.com/messasing/some-thing-1.552335/insert-reply"
  ["_GET"] => array(0) {
  ["_POST"] => array(8) {
    ["message_html"] => string(11) "<p>xd</p>"
    ["_xfRelativeResolver"] => string(58) "http://www.mysite.com/messasing/some-thing-1.552335/"
    ["last_date"] => string(10) "1440393547"
    ["last_known_date"] => string(0) ""
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(34) "/messasing/some-thing-1.552335/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
Is it a problem with the add-on or with XF 1.5?


Chris D

XenForo developer
Staff member
Relatively confident that it's an add-on. But the simple test would be, if you can reproduce it reliably, to disable the add-on and try again.


Well-known member
This happened a few days ago and have not happen again (and the add-on has been used many times since then). Maybe it was what developers call a "race condition"?

Could you please provide a bit more details about that specific error? Is it a serious one or could it be missed?


Well-known member
Before bothering him I'm trying to see if it is a serious issue or not because it has happened only one time since I upgraded to 1.5. When I was on 1.4 I never saw that error.
Last edited:

Chris D

XenForo developer
Staff member
We didn't actually touch any Conversation code in 1.5 so the version change should be unrelated.

It's a weird error. It's actually one that shouldn't be possible, at all in the existing code.

It seems to me as though it's happening as the result of a reply being inserted into an existing conversation, but that code should only be happening when a new conversation is being created.

Definitely an issue that seems like it might be add-on related.