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

Fixed Error on thread deletion

Affected version
XFES 1.1.7
#1
Hello -

Running ES 6 and XFES 1.1.7 - everytime I hard delete a thread, I get an error as follows:

Server Error Log
Error Info XenForo_Exception: Elasticsearch indexing failed Elasticsearch error: The bulk request must be terminated by a newline [ ] - library/Xexxxxxx/Search/SourceHandler/ElasticSearch.php:1062
Generated By: B & K Sales LLC, Yesterday at 4:28 PM
Stack Trace #0 /home/xxxxxx/public_html/xen/library/Xexxxxxx/Search/SourceHandler/ElasticSearch.php(1185): Xexxxxxx_Search_SourceHandler_ElasticSearch->_logSearchResponseError(Object(stdClass), false, 'Elasticsearch i...')
#1 /home/xxxxxx/public_html/xen/library/Xexxxxxx/Search/SourceHandler/ElasticSearch.php(117): Xexxxxxx_Search_SourceHandler_ElasticSearch->_triggerFailedIndexError(Object(stdClass), Array, true)
#2 /home/xxxxxx/public_html/xen/library/XenForo/Search/Indexer.php(105): Xexxxxxx_Search_SourceHandler_ElasticSearch->deleteFromIndex('post', Array)
#3 /home/xxxxxx/public_html/xen/library/XenForo/Search/DataHandler/Post.php(99): XenForo_Search_Indexer->deleteFromIndex('post', Array)
#4 /home/xxxxxx/public_html/xen/library/XenForo/Search/DataHandler/Abstract.php(316): XenForo_Search_DataHandler_Post->_deleteFromIndex(Object(XenForo_Search_Indexer), Array)
#5 /home/xxxxxx/public_html/xen/library/XenForo/DataWriter/Discussion.php(731): XenForo_Search_DataHandler_Abstract->deleteFromIndex(Object(XenForo_Search_Indexer), Array)
#6 /home/xxxxxx/public_html/xen/library/XenForo/DataWriter/Discussion.php(640): XenForo_DataWriter_Discussion->_deleteFromSearchIndex()
#7 /home/xxxxxx/public_html/xen/library/XenForo/DataWriter/Discussion.php(464): XenForo_DataWriter_Discussion->_indexForSearch()
#8 /home/xxxxxx/public_html/xen/library/XenForo/DataWriter.php(1423): XenForo_DataWriter_Discussion->_postSave()
#9 /home/xxxxxx/public_html/xen/library/XenForo/Model/Thread.php(2014): XenForo_DataWriter->save()
#10 /home/xxxxxx/public_html/xen/library/XenForo/ControllerPublic/Thread.php(1314): XenForo_Model_Thread->deleteThread(341645, 'soft', Array)
#11 /home/xxxxxx/public_html/xen/library/XenForo/FrontController.php(351): XenForo_ControllerPublic_Thread->actionDelete()
#12 /home/xxxxxx/public_html/xen/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#13 /home/xxxxxx/public_html/xen/index.php(13): XenForo_FrontController->run()
#14 {main}
Request State array(3) {
["url"] => string(59) "https://www.xxxxxx.com/xen/threads/341645/delete"
["_GET"] => array(0) {
}
["_POST"] => array(4) {
["reason"] => string(3) "old"
["hard_delete"] => string(1) "0"
["_xfConfirm"] => string(1) "1"
["_xfToken"] => string(8) "********"
}
}
 

Mike

XenForo developer
Staff member
#2
This has been fixed already, but you can resolve it by changing the following in library/XenES/Api.php:
Code:
implode("\n", $deletes)
to:
Code:
implode("\n", $deletes) . "\n"