XF 2.1 Error: Call to a member function getIdentifier() on null src/XF/Mvc/Entity/Finder.php:1299


Active member
Hello, every day I received this error 1-2 times, in completely different places unrelated to each other. This started after upgrading to the latest version of Xenforo.

  • Error: Call to a member function getIdentifier() on null
  • src/XF/Mvc/Entity/Finder.php:1299
#0 src/XF/Pub/Controller/Report.php(28): XF\Mvc\Entity\Finder->fetch()
#1 src/XF/Mvc/Dispatcher.php(321): XF\Pub\Controller\Report->actionIndex(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('XF:Report', 'Index', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Report), NULL)
#3 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Report), NULL)
#4 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2178): XF\Mvc\Dispatcher->run()
#6 src/XF.php(390): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}

Request state
array(4) {
["url"] => string(9) "/reports/"
["referrer"] => string(43) "https://www.domain.com/reports/19270/"
["_GET"] => array(0) {
["_POST"] => array(0) {

Chris D

XenForo developer
Staff member
I can't really provide much insight to this other than to say, fairly obviously, this is not expected. It's also not something we can reproduce.

I cannot see specifically what would cause this to happen.

Unfortunately, no changes have been made in this code. Almost none of it has changed for years, some of it is up to 6 years old, making it the oldest code within the XF2 code-base.

So, all that to say, nothing has changed in recent versions which would have caused this.

Therefore other factors will be involved.

Ideally, we'd need a way to reproduce this or more information, or more information on what else might have changed before it started happening. Particularly server changes or add-on changes.