Server issue Unable to create new styles


Well-known member
It seems XenForo has a limit on how many styles can be created, caused by the way it saves style data in registry.

When creating new style in admin panel I got this exception:
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. - library/Zend/Db/Statement/Mysqli.php:214
Generated By: Arty, 7 minutes ago
Stack Trace
#0 library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 library/XenForo/Model/DataRegistry.php(164): Zend_Db_Adapter_Abstract->query('\r\n\t\t\tINSERT INT...', Array)
#3 library/XenForo/Model/Style.php(434): XenForo_Model_DataRegistry->set('styles', Array)
#4 library/XenForo/DataWriter/Style.php(169): XenForo_Model_Style->rebuildStyleCache()
#5 library/XenForo/DataWriter/Style.php(160): XenForo_DataWriter_Style->_rebuildCache()
#6 library/XenForo/DataWriter.php(1409): XenForo_DataWriter_Style->_postSave()
#7 library/XenForo/Model/StyleProperty.php(771): XenForo_DataWriter->save()
#8 library/XenForo/Model/StyleProperty.php(629): XenForo_Model_StyleProperty->updatePropertyCacheInStyle(91, Array, Array)
#9 library/XenForo/DataWriter/Style.php(153): XenForo_Model_StyleProperty->rebuildPropertyCacheInStyleAndChildren(91)
#10 library/XenForo/DataWriter.php(1409): XenForo_DataWriter_Style->_postSave()
#11 library/XenForo/ControllerAdmin/Style.php(95): XenForo_DataWriter->save()
#12 library/XenForo/FrontController.php(347): XenForo_ControllerAdmin_Style->actionSave()
#13 library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#14 admin.php(13): XenForo_FrontController->run()
#15 {main}
Request State
'url' => string 'admin.php?styles/save' (length=47)
'_GET' =>
array (size=1)
'styles/save' => string '' (length=0)
'_POST' =>
array (size=10)
'parent_id' => string '79' (length=2)
'title' => string 'Elegance 2 Config' (length=17)
'description' => string '' (length=0)
'user_selectable' => string '1' (length=1)
'style_id' => string '' (length=0)
'donotparse' => string '1' (length=1)
'_xfToken' => string '********' (length=8)
'_xfRequestUri' => string '/dev/admin.php?styles/add' (length=25)
'_xfNoRedirect' => string '1' (length=1)
'_xfResponseType' => string 'json' (length=4)


Well-known member
Fixed it by changing engine for xf_data_registry table to MyISAM:
ALTER TABLE `xf_data_registry` ENGINE = MyISAM;


XenForo developer
Staff member
Please see: This is more of a server configuration issue since blobs are generally stored externally. There are still going to be max_allowed_packet style issues. There are some situations where server configurations will need to be changed to support specific requirements.

Regardless, that large a number of styles is really nowhere near an expected or designed system requirement. I understand it could apply to a style designer on a development board, but that isn't something we'd be targeting at the expense of configurations for production boards. (A development board with specific requirements would be a good example of where configuration changes would be expected.)