• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Server error site wide including admin.

Stuart Wright

Well-known member
Server Error
Invalid argument supplied for foreach()

  1. XenForo_Application::handlePhpError() in Dark/PostRating/Model/User.php at line 14
  2. Dark_PostRating_Model_User->prepareUserFetchOptions() in XenCentral/Trade/Model/XfUser.php at line 22
  3. XenCentral_Trade_Model_XfUser->prepareUserFetchOptions() in XenForo/Model/User.php at line 438
  4. XenForo_Model_User->getUserById() in XenForo/ControllerAdmin/Login.php at line 10
  5. XenForo_ControllerAdmin_Login->actionForm() in XenForo/FrontController.php at line 347
  6. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  7. XenForo_FrontController->run() in /home/sites/avforums/public_html/admin.php at line 13
This follows editing the config.php to add
$config['cache']['frontendOptions']['automatic_serialization'] = true;
It crashing the site, and then reverting it.
Any ideas please?
AVForums is down at the moment.

Stuart Wright

Well-known member
I think you would need to take steps to purge the existing cache after enabling that.
Thank you Chris. I've put the option back in and asked Tim to flush the cache.
Hopefully that will fix the site.
I don't know about these server things. I wish there was a guide of some sort.

Stuart Wright

Well-known member
Still getting the error. Is there a way to disable a particular addon without access to the front or back end?
It looks like it's the post ratings addon which is causing the crash.

Chris D

XenForo developer
Staff member
Set enableListeners to false and then disable the problematic add on in the admin CP. You should then be able to set enableListeners to true.

Stuart Wright

Well-known member
I guess this is related, but now if I try to save a new thread with a prefix or edit a thread to add a prefix I get a front end crash
Fatal error: Cannot use string offset as an array in/home/sites/avforums/public_html/library/PrefixForumListing/Extend/DataWriter/Discussion/Thread.php on line 24

Have disabled that addon and will post in the discussion thread for it.
Last edited: