Fixed Error rebuild Conversations on Admin Area

Maestro2k5

Member
Affected version
2.1 RC 2
Error rebuild Conversations on Admin Area

Code:
InvalidArgumentException: Attempted to convert NULL to integer [last_message_date] in src/XF/Mvc/Entity/Entity.php at line 740
XF\Mvc\Entity\Entity->_castValueToType() in src/XF/Mvc/Entity/Entity.php at line 618
XF\Mvc\Entity\Entity->set() in src/XF/Mvc/Entity/Entity.php at line 548
XF\Mvc\Entity\Entity->__set() in src/XF/Entity/ConversationMaster.php at line 260
XF\Entity\ConversationMaster->rebuildCounters() in src/XF/Job/Conversation.php at line 27
XF\Job\Conversation->rebuildById() in src/XF/Job/AbstractRebuildJob.php at line 47
XF\Job\AbstractRebuildJob->run() in src/XF/Job/Manager.php at line 253
XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 195
XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 111
XF\Job\Manager->runByIds() in src/XF/Admin/Controller/Tools.php at line 120
XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 321
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
XF\App->run() in src/XF.php at line 390
XF::runApp() in admin.php at line 13
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.0 RC3).

Change log:
Prevent an error rebuilding conversations if there's a conversation with no messages present (this should never happen anyway)
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
So as mentioned, this appears to reflect a situation that should never happen -- a conversation with no messages. I can only guess there was either some manual database manipulation or this conversation was inserted as part of an import (potentially using a third party importer).
 
So as mentioned, this appears to reflect a situation that should never happen -- a conversation with no messages. I can only guess there was either some manual database manipulation or this conversation was inserted as part of an import (potentially using a third party importer).
Can you tell me Mike how to fix this error when using XF 2.0.12 instead of XF 2.1
 
Back
Top Bottom