1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Cannot insert a message in the middle of a discussion.

Discussion in 'Troubleshooting and Problems' started by caleb89taylor, Sep 19, 2014.

  1. caleb89taylor

    caleb89taylor Member

    Hi all,
    We upgraded from 1.1 to 1.3 and now are server error logs are flooded with the following error:

    "Cannot insert a message in the middle of a discussion."

    We aren't sure what's going on. From the code that is throwing the exception:

     if ($this->get('post_date') < $discussionDw->get('last_post_date'))                         
    // TODO: this doesn't deal with inserting a message in the middle of a discussion   
    throw new XenForo_Exception('Cannot insert a message in the middle of a discussion.');
    We aren't sure why we are getting this error. Something must be a little off as it doesn't happen on every post, in fact not on most posts. But it is happening often enough to annoy our users. We just set up a new database master/slave and all new servers so anything could be the culprit. Any ideas?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Check the server time is correct.
    Typically this is due to when the server time is earlier than the actual time.
  3. caleb89taylor

    caleb89taylor Member

    Theoretically if you had one server this wouldn't be an issue, right? If all the times were off by the same amount it shouldn't throw errors (correct me if I'm wrong there). But we have 12 servers in an ASG in AWS so if one or two of them are off then it could be causing the issues.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    If the server time is before the timestamp of the last post, it will throw this error.
  5. Mike

    Mike XenForo Developer Staff Member

    If your server times are not synchronized, then yes that would cause the problem. Syncing via NTP should be sufficient.
  6. caleb89taylor

    caleb89taylor Member

    Just confirmed with techops that we don't currently have the NTP client installed for our ASG. They are working on it now and I added IP logging in the mean time to see if I can nail down which servers are off. Thanks guys.
    Mike likes this.

Share This Page