XF 2.1 ErrorException: [E_NOTICE] Trying to get property 'is_discouraged' of non-object src/XF/Pub/Controller/AbstractController.php:365

Fattycakez1

Member
Hi so i been getting this error being generated by old forum users , I recently moved to XF 2 from 1.5

Code:
Stack trace
#0 src/XF/Pub/Controller/AbstractController.php(365): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/home/precision...', 365, Array)
#1 src/XF/Pub/Controller/AbstractController.php(25): XF\Pub\Controller\AbstractController->isDiscouraged()
#2 src/XF/Mvc/Controller.php(123): XF\Pub\Controller\AbstractController->preDispatchType('Index', Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(349): XF\Mvc\Controller->preDispatch('Index', Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(261): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'Index', Object(XF\Mvc\RouteMatch), Object(NF\Discord\XF\Pub\Controller\Thread), NULL)
#5 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(NF\Discord\XF\Pub\Controller\Thread), NULL)
#6 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#8 src/XF.php(391): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}
It's not related to nixfifty discord i believe since it seems to only effect very old users for some reason , and it shows different add-ons sometimes ..


And when i try to edit the user in the acp i get this

Code:
An exception occurred: [TypeError] Argument 2 passed to XF\App::getCustomFieldsForEdit() must be an instance of XF\CustomField\Set, null given in src/XF/App.php on line 1831

XF\App->getCustomFieldsForEdit()
call_user_func_array() in src/XF/Template/Templater.php at line 999
XF\Template\Templater->method() in internal_data/code_cache/templates/l1/s0/public/custom_fields_macros.php at line 174
XF\Template\Templater->{closure}() in src/XF/Template/Templater.php at line 701
XF\Template\Templater->callMacro() in internal_data/code_cache/templates/l1/s0/admin/user_edit.php at line 565
XF\Template\Templater->{closure}() in src/XF/Template/Templater.php at line 1315
XF\Template\Templater->renderTemplate() in src/XF/Template/Template.php at line 24
XF\Template\Template->render() in src/XF/Mvc/Renderer/Html.php at line 48
XF\Mvc\Renderer\Html->renderView() in src/XF/Mvc/Dispatcher.php at line 458
XF\Mvc\Dispatcher->renderView() in src/XF/Mvc/Dispatcher.php at line 440
XF\Mvc\Dispatcher->renderReply() in src/XF/Mvc/Dispatcher.php at line 400
XF\Mvc\Dispatcher->render() in src/XF/Mvc/Dispatcher.php at line 58
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
XF\App->run() in src/XF.php at line 391
XF::runApp() in admin.php at line 13

Thank you in advance
Regards,
 
Top