Fixed Moderators control error

akok

Active member
Affected version
2.0.3
good afternoon
I noticed that there were empty sections in the list of moderators
1521202045236.webp
When I try to select I get a notification
This content moderator relates to an unknown content type.

When you try to delete an empty one. In the error log I get a record
Error: Call to a member function getContentTitle() on null src/XF/Admin/Controller/Moderator.php:300
Generated By: akok Mar 16, 2018 at 2:09 PM
Stack Trace
#0 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\Moderator->actionContentDelete(Object(XF\Mvc\ParameterBag))
#1 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Moderator', 'Contentdelete', 'json', Object(XF\Mvc\ParameterBag), 'moderators', Object(XF\Admin\Controller\Moderator), NULL)
#2 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#3 src/XF/App.php(1891): XF\Mvc\Dispatcher->run()
#4 src/XF.php(328): XF\App->run()
#5 admin.php(13): XF::runApp('XF\\Admin\\App')
#6 {main}
array(4) {
["url"] => string(172) "/admin.php?moderators/content/18/delete&_xfRequestUri=%2Fadmin.php%3Fmoderators%2F&_xfWithData=1&_xfToken=1521202172%2Cf19b4c01fcd30e288943589cf5fd914a&_xfResponseType=json"
["referrer"] => string(41) "https://safezone.cc/admin.php?moderators/"
["_GET"] => array(5) {
["moderators/content/18/delete"] => string(0) ""
["_xfRequestUri"] => string(22) "/admin.php?moderators/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(43) "1521202172,f19b4c01fcd30e288943589cf5fd914a"
["_xfResponseType"] => string(4) "json"
}
["_POST"] => array(0) {
}
}
 
Thanks we've fixed this for the next release. Those moderators were created by content handlers which no longer exist - either an old, disabled add-on or some sort of orphaned data in the database. Safe to ignore for now, but they'll disappear after the next release.
 
Top Bottom