Resource icon

Conversation Improvements by Xon 1.3.15

No permission to download
Hi @Xon,

Thanks for this free addon.

I need your help if possible on an issue I'm facing:

I'm trying to rebuild the search index for Conversations, but I'm getting this error:

ErrorException: Undefined offset: 33 - library/SV/ConversationImprovements/Search/DataHandler/Conversation.php:116

Code:
Error Info
ErrorException: Undefined offset: 33 - library/SV/ConversationImprovements/Search/DataHandler/Conversation.php:116
Generated By: Admin, 4 minutes ago
Stack Trace

#0 /home/domain/public_html/forums/library/SV/ConversationImprovements/Search/DataHandler/Conversation.php(116): XenForo_Application::handlePhpError(8, 'Undefined offse...', '/home/domain/...', 116, Array)
#1 /home/domain/public_html/forums/library/SV/ConversationImprovements/Search/DataHandler/Conversation.php(92): SV_ConversationImprovements_Search_DataHandler_Conversation->quickIndex(Object(XenForo_Search_Indexer), Array)
#2 /home/domain/public_html/forums/library/XenForo/Deferred/SearchIndex.php(74): SV_ConversationImprovements_Search_DataHandler_Conversation->rebuildIndex(Object(XenForo_Search_Indexer), 0, 500)
#3 /home/domain/public_html/forums/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_SearchIndex->execute(Array, Array, 7.46848607063, '')
#4 /home/domain/public_html/forums/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.46848607063, '', false)
#5 /home/domain/public_html/forums/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, 7.46849012375, '', false)
#6 /home/domain/public_html/forums/library/XenForo/ViewRenderer/Abstract.php(352): XenForo_Model_Deferred->run(true, 7.46849012375)
#7 /home/domain/public_html/forums/library/XenForo/ViewRenderer/Json.php(147): XenForo_ViewRenderer_Abstract::hasManualDeferredToRun()
#8 /home/domain/public_html/forums/library/XenForo/ViewRenderer/Json.php(185): XenForo_ViewRenderer_Json::_addDefaultParams(Array)
#9 /home/domain/public_html/forums/library/XenForo/ViewAdmin/Error/ServerError.php(47): XenForo_ViewRenderer_Json::jsonEncodeForOutput(Array)
#10 /home/domain/public_html/forums/library/XenForo/ViewRenderer/Abstract.php(227): XenForo_ViewAdmin_Error_ServerError->renderJson()
#11 /home/domain/public_html/forums/library/XenForo/ViewRenderer/Json.php(88): XenForo_ViewRenderer_Abstract->renderViewObject('XenForo_ViewAdm...', 'Json', Array, 'error_server_er...')
#12 /home/domain/public_html/forums/library/XenForo/FrontController.php(605): XenForo_ViewRenderer_Json->renderView('XenForo_ViewAdm...', Array, 'error_server_er...', NULL)
#13 /home/domain/public_html/forums/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_Json), Array)
#14 /home/domain/public_html/forums/admin.php(13): XenForo_FrontController->run()
#15 {main}

Request State

array(3) {
  ["url"] => string(62) "http://www.domain.org/forums/admin.php?tools/run-deferred"
  ["_GET"] => array(1) {
    ["tools/run-deferred"] => string(0) ""
  }
  ["_POST"] => array(5) {
    ["execute"] => string(1) "1"
    ["_xfRequestUri"] => string(31) "/forums/admin.php?tools/rebuild"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}

I should mention that the installation of the addon was interrupted (I don't know why), but was completed after completing the manual rebuild process from the ACP.


When trying to rebuild the search index for Conversation Messages, I'm getting this error:

Code:
ErrorException: Undefined offset: 75 - library/SV/ConversationImprovements/Search/DataHandler/ConversationMessage.php:140
Generated By: admin, A moment ago
Stack Trace

#0 /home/domain/public_html/forums/library/SV/ConversationImprovements/Search/DataHandler/ConversationMessage.php(140): XenForo_Application::handlePhpError(8, 'Undefined offse...', '/home/domain/...', 140, Array)
#1 /home/domain/public_html/forums/library/SV/ConversationImprovements/Search/DataHandler/ConversationMessage.php(108): SV_ConversationImprovements_Search_DataHandler_ConversationMessage->quickIndex(Object(XenForo_Search_Indexer), Array)
#2 /home/domain/public_html/forums/library/XenForo/Deferred/SearchIndex.php(74): SV_ConversationImprovements_Search_DataHandler_ConversationMessage->rebuildIndex(Object(XenForo_Search_Indexer), 500, 500)
#3 /home/domain/public_html/forums/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_SearchIndex->execute(Array, Array, 7.99999380112, '')
#4 /home/domain/public_html/forums/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.99999380112, '', false)
#5 /home/domain/public_html/forums/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#6 /home/domain/public_html/forums/library/XenForo/ControllerAdmin/Tools.php(159): XenForo_Model_Deferred->run(true, NULL, '', false)
#7 /home/domain/public_html/forums/library/XenForo/FrontController.php(351): XenForo_ControllerAdmin_Tools->actionRunDeferred()
#8 /home/domain/public_html/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /home/domain/public_html/forums/admin.php(13): XenForo_FrontController->run()
#10 {main}

Request State

array(3) {
  ["url"] => string(62) "http://www.domain.org/forums/admin.php?tools/run-deferred"
  ["_GET"] => array(1) {
    ["tools/run-deferred"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["redirect"] => string(67) "http://www.domain.org/forums/admin.php?tools/rebuild&success=1"
    ["execute"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
  }
}

I don't have any other errors in my server logs apart from these two and the reminder to rebuild the search index:
Code:
Exception: Please rebuild the search index for the content types: Conversation, Conversation Message - library/SV/Utils/Install.php:100

I'm able to rebuild the indexes on a local sandbox of my XF installation, but getting these errors on the live forum.
 
Last edited:
@sgr have you manually edited the conversation recipients?

It looks like you have some conversations with no active recipients, and my add-on isn't handling that since it expects those to be deleted.
 
Last edited:
@sgr have you manually edited the conversation recipients?

It looks like you have some conversations with no active recipients, and my add-on isn't handling that since it expects those to be deleted.


I don't remember, but there might have been some manual edits.

The updated version of your addon has fixed my issue. I was able to rebuild the search cache without any errors. Thanks! :)
 
  • Like
Reactions: Xon
Just to help any other newbies out there...

On the Overview page it states:
Manual post-installation steps - Rebuild Search Index
The add-on will report conversation related content types that require re-indexing.

However, after installing I didn't see any kind of report about such? :confused: Then I next noticed, I had a new entry in my Server Error Log…(Oh great, what have 'I' done wrong now?) :eek: When I clicked on it, I saw...

Screen Shot 2016-04-09 at 3.57.18 PM.webp
:LOL: So that's where the report appears at! :cool: Installation went perfectly and it works fine.

Thanxx Xon, for such a great add-on!
 
@Xon

After installing this addon, the quick search bar starts to include results from conversation by default (i.e. it searches everything). Can I change that behaviour? I want the quick search bar to not include conversation search results.
 
@Xon

After installing this addon, the quick search bar starts to include results from conversation by default (i.e. it searches everything). Can I change that behaviour? I want the quick search bar to not include conversation search results.
My add-on Enhanced Search Improvements can be used to globally bias conversation search results to be less important (or outright disabled) for quick search. But this requires XFES/Elastic Search.
 
Just to help any other newbies out there...

On the Overview page it states:
Manual post-installation steps - Rebuild Search Index
The add-on will report conversation related content types that require re-indexing.

However, after installing I didn't see any kind of report about such? :confused: Then I next noticed, I had a new entry in my Server Error Log…(Oh great, what have 'I' done wrong now?) :eek: When I clicked on it, I saw...

:LOL: So that's where the report appears at! :cool: Installation went perfectly and it works fine.

Thanxx Xon, for such a great add-on!
So what do you do from there?
 
Hi @Xon :)

Just added this, since being unable to search conversations isnt good (and this lessens the time to find things!).

Have rebuilt indexes, however when i rebuild Caches for Conversations and Conversation message, they both come back as zero (and any conversation search comes back with no matches) :(

Am i missing something?? :)

Cheers
Paul
 
Only conversations you can view are searchable. Try searching from within a conversation and see if you get any hits back.

It works for me on my two boards, so it may be a conflict somewhere.
 
Code:
Error Info
XenForo_Exception: Non-recipients cannot reply to a conversation. - library/XenForo/DataWriter/ConversationMessage.php:146
Generated By: soul redemption, Today at 8:18 AM
Stack Trace
#0 /library/SV/ConversationImprovements/XenForo/DataWriter/ConversationMessage.php(73): XenForo_DataWriter_ConversationMessage->_preSave()
#1 /library/XenForo/DataWriter.php(1460): SV_ConversationImprovements_XenForo_DataWriter_ConversationMessage->_PreSave()
#2 /library/XenForo/DataWriter.php(1399): XenForo_DataWriter->preSave()
#3 /library/SV/ConversationImprovements/LikeHandler/ConversationMessage.php(22): XenForo_DataWriter->save()
#4 /library/XenForo/Model/Like.php(276): SV_ConversationImprovements_LikeHandler_ConversationMessage->incrementLikeCounter(607235, Array)
#5 /library/SV/ConversationImprovements/XenForo/ControllerPublic/Conversation.php(34): XenForo_Model_Like->likeContent('conversation_me...', 607235, NULL)
#6 /library/XenForo/FrontController.php(351): SV_ConversationImprovements_XenForo_ControllerPublic_Conversation->actionLike()
#7 /library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /index.php(13): XenForo_FrontController->run()
#9 {main}
Request State
array(3) {
  ["url"] => string(70) "http://www.domain.com/conversations/hi.360061/like?message_id=607235"
  ["_GET"] => array(2) {
    ["/conversations/hi_360061/like"] => string(0) ""
    ["message_id"] => string(6) "607235"
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(25) "/conversations/hi.360061/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}


Error Info
XenForo_Exception: Non-recipients cannot reply to a conversation. - library/XenForo/DataWriter/ConversationMessage.php:146
Generated By: soul redemption, Today at 8:18 AM
Stack Trace
#0 /library/SV/ConversationImprovements/XenForo/DataWriter/ConversationMessage.php(73): XenForo_DataWriter_ConversationMessage->_preSave()
#1 /library/XenForo/DataWriter.php(1460): SV_ConversationImprovements_XenForo_DataWriter_ConversationMessage->_PreSave()
#2 /library/XenForo/DataWriter.php(1399): XenForo_DataWriter->preSave()
#3 /library/SV/ConversationImprovements/LikeHandler/ConversationMessage.php(22): XenForo_DataWriter->save()
#4 /library/XenForo/Model/Like.php(276): SV_ConversationImprovements_LikeHandler_ConversationMessage->incrementLikeCounter(607235, Array)
#5 /library/SV/ConversationImprovements/XenForo/ControllerPublic/Conversation.php(34): XenForo_Model_Like->likeContent('conversation_me...', 607235, NULL)
#6 /library/XenForo/FrontController.php(351): SV_ConversationImprovements_XenForo_ControllerPublic_Conversation->actionLike()
#7 /library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /index.php(13): XenForo_FrontController->run()
#9 {main}
Request State
array(3) {
  ["url"] => string(70) "http://www.domain.com/conversations/hi.360061/like?message_id=607235"
  ["_GET"] => array(2) {
    ["/conversations/hi_360061/like"] => string(0) ""
    ["message_id"] => string(6) "607235"
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(25) "/conversations/hi.360061/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
@RoldanLT

Thanks, I've fixed this. Will release it in a few days as I'm working other a few other bits first.

This is caused by liking a post by a user who has left a conversation (or has been deleted?)
 
  • Like
Reactions: rdn
Top Bottom