Conversation Improvements by Xon

Conversation Improvements by Xon 2.4.6

No permission to download

Xon

Well-known member
Getting these errors when trying to create new PM's

Code:
Server error log
XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'last_edit_date' in 'field list' src/XF/Db/AbstractStatement.php:212
Generated by: wonko Jul 17, 2018 at 5:56 AM
Stack trace
INSERT  INTO `xf_conversation_master` (`user_id`, `username`, `open_invite`, `conversation_open`, `title`, `start_date`, `last_message_date`, `last_message_user_id`, `last_message_username`, `conversation_id`, `reply_count`, `recipient_count`, `first_message_id`, `last_message_id`, `recipients`, `last_edit_date`, `last_edit_user_id`, `edit_count`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(160): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#5 src/XF/Mvc/Entity/Entity.php(1389): XF\Db\AbstractAdapter->insert('xf_conversation...', Array, false)
#6 src/XF/Mvc/Entity/Entity.php(1121): XF\Mvc\Entity\Entity->_saveToSource()
#7 src/XF/Service/Conversation/Creator.php(206): XF\Mvc\Entity\Entity->save(true, false)
#8 src/XF/Service/ValidateAndSavableTrait.php(40): XF\Service\Conversation\Creator->_save()
#9 src/XF/Pub/Controller/Conversation.php(301): XF\Service\Conversation\Creator->save()
#10 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Conversation->actionAdd(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Conversation', 'Add', 'json', Object(XF\Mvc\ParameterBag), 'conversations', Object(SV\ConversationImprovements\XF\Pub\Controller\Conversation), NULL)
#12 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#14 src/XF.php(328): XF\App->run()
#15 index.php(13): XF::runApp('XF\\Pub\\App')
#16 {main}
Request state
array(4) {
  ["url"] => string(18) "/conversations/add"
  ["referrer"] => string(45) "https://mattwservices.co.uk/conversations/add"
  ["_GET"] => array(1) {
    ["/conversations/add"] => string(0) ""
  }
  ["_POST"] => array(10) {
    ["tokens_select"] => string(4) "Matt"
    ["recipients"] => string(4) "Matt"
    ["title"] => string(11) "REMOVED"
    ["message_html"] => string(251) "<p>REMOVED</p>
    ["attachment_hash"] => string(32) "5c7b8617e2ec35135f5a5903b4d521f2"
    ["attachment_hash_combined"] => string(86) "{"type":"conversation_message","context":[],"hash":"5c7b8617e2ec35135f5a5903b4d521f2"}"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(18) "/conversations/add"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}

EDIT: This was an upgrade from the XF1 version as well.
 
Code:
MariaDB [forum]> describe xf_conversation_master;
+--------------------------------+---------------------+------+-----+---------+----------------+
| Field                          | Type                | Null | Key | Default | Extra          |
+--------------------------------+---------------------+------+-----+---------+----------------+
| conversation_id                | int(10) unsigned    | NO   | PRI | NULL    | auto_increment |
| title                          | varchar(150)        | NO   |     | NULL    |                |
| user_id                        | int(10) unsigned    | NO   | MUL | NULL    |                |
| username                       | varchar(50)         | NO   |     | NULL    |                |
| start_date                     | int(10) unsigned    | NO   | MUL | NULL    |                |
| open_invite                    | tinyint(3) unsigned | NO   |     | 0       |                |
| conversation_open              | tinyint(3) unsigned | NO   |     | 1       |                |
| reply_count                    | int(10) unsigned    | NO   |     | 0       |                |
| recipient_count                | int(10) unsigned    | NO   |     | 0       |                |
| first_message_id               | int(10) unsigned    | NO   |     | NULL    |                |
| last_message_date              | int(10) unsigned    | NO   |     | NULL    |                |
| last_message_id                | int(10) unsigned    | NO   |     | NULL    |                |
| last_message_user_id           | int(10) unsigned    | NO   |     | NULL    |                |
| last_message_username          | varchar(50)         | NO   |     | NULL    |                |
| recipients                     | mediumblob          | NO   |     | NULL    |                |
| conversation_edit_count        | int(11)             | NO   |     | 0       |                |
| conversation_last_edit_date    | int(11)             | NO   |     | 0       |                |
| conversation_last_edit_user_id | int(11)             | NO   |     | 0       |                |
+--------------------------------+---------------------+------+-----+---------+----------------+
 
@mcatze can you show me the full output of;

SQL:
show create table xf_conversation_message;
show create table xf_conversation_master;
 
Sure..

1.
SQL:
CREATE TABLE `xf_conversation_message` (
 `message_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `conversation_id` int(10) unsigned NOT NULL,
 `message_date` int(10) unsigned NOT NULL,
 `user_id` int(10) unsigned NOT NULL,
 `username` varchar(50) NOT NULL,
 `message` mediumtext NOT NULL,
 `attach_count` smallint(5) unsigned NOT NULL DEFAULT '0',
 `ip_id` int(10) unsigned NOT NULL DEFAULT '0',
 `_likes` int(10) unsigned NOT NULL DEFAULT '0',
 `_like_users` blob,
 `edit_count` int(10) unsigned NOT NULL DEFAULT '0',
 `last_edit_date` int(10) unsigned NOT NULL DEFAULT '0',
 `last_edit_user_id` int(10) unsigned NOT NULL DEFAULT '0',
 `likes` int(10) unsigned NOT NULL DEFAULT '0',
 `like_users` blob NOT NULL,
 `embed_metadata` blob,
 `react_users` blob,
 PRIMARY KEY (`message_id`),
 KEY `conversation_id_message_date` (`conversation_id`,`message_date`),
 KEY `message_date` (`message_date`),
 KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=111 DEFAULT CHARSET=utf8

2.
SQL:
CREATE TABLE `xf_conversation_master` (
 `conversation_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `title` varchar(150) NOT NULL,
 `user_id` int(10) unsigned NOT NULL,
 `username` varchar(50) NOT NULL,
 `start_date` int(10) unsigned NOT NULL,
 `open_invite` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `conversation_open` tinyint(3) unsigned NOT NULL DEFAULT '1',
 `reply_count` int(10) unsigned NOT NULL DEFAULT '0',
 `recipient_count` int(10) unsigned NOT NULL DEFAULT '0',
 `first_message_id` int(10) unsigned NOT NULL,
 `last_message_date` int(10) unsigned NOT NULL,
 `last_message_id` int(10) unsigned NOT NULL,
 `last_message_user_id` int(10) unsigned NOT NULL,
 `last_message_username` varchar(50) NOT NULL,
 `recipients` mediumblob NOT NULL,
 `conversation_edit_count` int(11) NOT NULL DEFAULT '0',
 `conversation_last_edit_date` int(11) NOT NULL DEFAULT '0',
 `conversation_last_edit_user_id` int(11) NOT NULL DEFAULT '0',
 `first_react_users` blob,
 PRIMARY KEY (`conversation_id`),
 KEY `user_id` (`user_id`),
 KEY `start_date` (`start_date`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8
 
Hi,
just installed this on my test-forum on 2.0.10 and I am getting strange search behavior. (I use Enhanced search and have rebuilt the index).

If I use the search "Everywhere" for a keyword contained in one of my conversations, all is well and the conversation as well as matching conversation-messages are returned.

But if I use search "Conversations" or, while having the relevant conversation open, use "This conversation" nohting is returned. Same for "use title only".

Nothing in the server log or Javascript-console.

Is this just me (eg. addon-conflict) or a general problem ?


TIA,
-Markus
 
It sounds like the conversation content type restrictions aren't being properly formed.

I'll look into this, I need to-do a full rebuild of the search index for my dev environment anyway.
 
Top Bottom