Fixed Similar threads widget error: All thread_id values must be unique


Well-known member
So this is on RC1. Once or twice a week. Would be updating to RC2. Since the bug fix post above mentions B6, decided to post here as a FYI. Would report back if this happens on RC2 in coming days.

XF\PrintableException: Error rendering widget: All thread_id values must be unique. src/XF/Mvc/Entity/Entity.php:1212
Generated by: Unknown account Sep 21, 2020 at 10:51 AM
Stack trace
#0 src/addons/XFES/Widget/SimilarThreads.php(170): XF\Mvc\Entity\Entity->save()
#1 src/addons/XFES/Widget/SimilarThreads.php(59): XFES\Widget\SimilarThreads->getSimilarThreadsCache()
#2 code_cache/widgets/_34_xfes_thread_view_below_quick_reply_similar_threads.php(5): XFES\Widget\SimilarThreads->render()
#3 src/XF/Template/Templater.php(7300): XF\SubContainer\Widget->{closure}()
#4 src/XF/SubContainer/Widget.php(168): XF\Template\Templater->renderWidgetClosure()
#5 src/XF/Template/Templater.php(1873): XF\SubContainer\Widget->getCompiledWidget()
#6 code_cache/templates/l1/s37/public/thread_view.php(1055): XF\Template\Templater->widgetPosition()
#7 src/XF/Template/Templater.php(1598): XF\Template\Templater->{closure}()
#8 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate()
#9 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#10 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView()
#11 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView()
#12 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply()
#13 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render()
#14 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#15 src/XF.php(464): XF\App->run()
#16 index.php(20): XF::runApp()
#17 {main}

Request state
array(4) {
  ["url"] => string(9) "/t/98434/"
  ["referrer"] => string(23) ""
  ["_GET"] => array(0) {
  ["_POST"] => array(0) {

XF Bug Bot

XenForo bug fixer bot
Staff member
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 XFES release (2.2.0 RC3).

Change log:
Suppress an error relating to a race condition when inserting the similar thread cache
There may be a delay before changes are rolled out to the XenForo Community.