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

Fixed  Rebuild User Caches after deletion of user group...

Jaxel

Well-known member
#1
I had a secondary usergroup from my old forum... I have deleted it on my new forum. However, it looks like the database has retained the secondary usergroup value. Now when I try to rebuild user caches I get the following error:

Server Error

Mysqli statement execute error : Incorrect integer value: '' for column 'display_style_group_id' at row 1
  1. [*]Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 292
    [*]Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 468
    [*]Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 604
    [*]Zend_Db_Adapter_Abstract->update() in XenForo/DataWriter/User.php at line 846
    [*]XenForo_DataWriter_User->rebuildDisplayStyleGroupId() in XenForo/CacheRebuilder/User.php at line 62
    [*]XenForo_CacheRebuilder_User->rebuild() in XenForo/ControllerHelper/CacheRebuild.php at line 26
    [*]XenForo_ControllerHelper_CacheRebuild->rebuildCache() in XenForo/ControllerAdmin/Tools.php at line 63
    [*]XenForo_ControllerAdmin_Tools->actionCacheRebuild() in XenForo/FrontController.php at line 303
    [*]XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    [*]XenForo_FrontController->run() in /admin.php at line 13
 

Jaxel

Well-known member
#2
I have discovered the issue... if you delete a usergroup, and a user has that usergroup listed as his primary usergroup, it will break.
 

Mike

XenForo developer
Staff member
#3
I have fixed the code to prevent the listed error.

However, I can't reproduce the underlying issue. I can see the theory of it happening - the xf_user_group_relation table not having the correct data - but users are moved to a different primary group when the user group itself is deleted. We'd have to try to figure out why incorrect data is in that table in the first place.