Fixed No entity found for 'conversation_message' with ID 2037

punisher1

Member
After upgrading my forum to latest version, simply emoji spritesheet png file turned to default version and I was too lazy to re-make it. So simply, I removed 3 custom reactions added by me from system. And now I'm having this issue:


  • InvalidArgumentException: No entity found for 'conversation_message' with ID 2037
  • src/XF/Repository/Reaction.php:237

Code:
#0 src/XF/Entity/ReactionContent.php(198): XF\Repository\Reaction->rebuildContentReactionCache('conversation_me...', 2037, false)
#1 src/XF/Entity/ReactionContent.php(151): XF\Entity\ReactionContent->rebuildContentReactionCache()
#2 src/XF/Mvc/Entity/Entity.php(1595): XF\Entity\ReactionContent->_postDelete()
#3 src/XF/Job/ReactionDelete.php(48): XF\Mvc\Entity\Entity->delete(false)
#4 src/XF/Job/Manager.php(253): XF\Job\ReactionDelete->run(G)
#5 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#6 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#7 src/XF/Admin/Controller/Tools.php(139): XF\Job\Manager->runQueue(true, 8)
#8 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#10 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#11 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(2190): XF\Mvc\Dispatcher->run()
#13 src/XF.php(391): XF\App->run()
#14 admin.php(13): XF::runApp('XF\\Admin\\App')
#15 {main}


Code:
array(4) {
  ["url"] => string(30) "/forum/admin.php?tools/run-job"
  ["referrer"] => string(58) "https://**********/forum/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(16) "/forum/admin.php"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(0) ""
  }
}
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.1.11).

Change log:
Prevent an error when cleaning up reactions if the related content is unexpectedly missing.
There may be a delay before changes are rolled out to the XenForo Community.
 
This should be a fairly simple workaround. In src/XF/Entity/ReactionContent.php. you can change:

Code:
$repo->rebuildContentReactionCache($this->content_type, $this->content_id, $this->getOption('is_like_only'));

to:
Code:
$repo->rebuildContentReactionCache(
    $this->content_type,
    $this->content_id,
    $this->getOption('is_like_only'),
    false
);

You should then be able to pick the job back up. Note that this will report unexpected contents in this file -- that is normal with an edit like this.
 
Back
Top Bottom