XF 2.0 ErrorException: [E_NOTICE] Trying to get property of non-object

Natureboy

Member
Hi Please help with this:

When a user tries to login into our site, they are getting this error:

Oops an error occurred with trying to generate page..

I found a fix, but I can't do this to 29k people:

When I go into her Account settings on xenforo, and save them. Then it fixes the error.

  • errorException: [E_NOTICE] Trying to get property of non-object
  • src\XF\Pub\Controller\AbstractController.php:263
  • Generated by: Jessica7873
  • May 9, 2018 at 10:02 AM
Stack trace
#0 src\XF\Pub\Controller\AbstractController.php(263): XF::handlePhpError(8, 'Trying to get p...', 'C:\\inetpub\\wwwr...', 263, Array)
#1 src\XF\Pub\Controller\AbstractController.php(24): XF\Pub\Controller\AbstractController->isDiscouraged()
#2 src\XF\Mvc\Controller.php(117): XF\Pub\Controller\AbstractController->preDispatchType('Index', Object(XF\Mvc\ParameterBag))
#3 src\XF\Mvc\Dispatcher.php(248): XF\Mvc\Controller->preDispatch('Index', Object(XF\Mvc\ParameterBag))
#4 src\XF\Mvc\Dispatcher.php(89): XF\Mvc\Dispatcher->dispatchClass('XF:Index', 'index', 'html', Object(XF\Mvc\ParameterBag), '', Object(XF\Pub\Controller\Index), NULL)
#5 src\XF\Mvc\Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src\XF\App.php(1891): XF\Mvc\Dispatcher->run()
#7 src\XF.php(328): XF\App->run()
#8 index.php(13): XF::runApp('XF\\Pub\\App')
#9 {main}
Request state
array(4) {
["url"] => string(1) "/"
["referrer"] => string(23) "http://myreinspace.com/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Were the users imported from another software or using an unofficial import method?

It seems like various expected user records are not available. This query should fix it:

SQL:
INSERT IGNORE INTO xf_user_option (user_id) SELECT user_id FROM xf_user;
INSERT IGNORE INTO xf_user_privacy (user_id) SELECT user_id FROM xf_user;
INSERT IGNORE INTO xf_user_profile (user_id) SELECT user_id FROM xf_user;
INSERT IGNORE INTO xf_user_authenticate (user_id) SELECT user_id FROM xf_user;
 

So...

 
Were the users imported from another software or using an unofficial import method?

It seems like various expected user records are not available. This query should fix it:

SQL:
INSERT IGNORE INTO xf_user_option (user_id) SELECT user_id FROM xf_user;
INSERT IGNORE INTO xf_user_privacy (user_id) SELECT user_id FROM xf_user;
INSERT IGNORE INTO xf_user_profile (user_id) SELECT user_id FROM xf_user;
INSERT IGNORE INTO xf_user_authenticate (user_id) SELECT user_id FROM xf_user;
where to write that?
 
Back
Top Bottom