Fixed Mysqli statement execute error : Data too long for column 'modification_key'

refael

Well-known member
I was working on a addon for a customer that should replace English chars with Bangla chars (using a js code), so I accidently tried to save a template modification with the modification key: রেল্লেচত_আভ্র_এদিতর
And I got this sql error

Code:
Mysqli statement execute error : Data too long for column 'modification_key' at row 1
Zend_Db_Statement_Mysqli->_execute() in C:\xampp\htdocs\xf\library\Zend\Db\Statement.php at line 317
Zend_Db_Statement->execute() in C:\xampp\htdocs\xf\library\Zend\Db\Adapter\Abstract.php at line 479
Zend_Db_Adapter_Abstract->query() in C:\xampp\htdocs\xf\library\Zend\Db\Adapter\Abstract.php at line 632
Zend_Db_Adapter_Abstract->update() in C:\xampp\htdocs\xf\library\XenForo\DataWriter.php at line 1640
XenForo_DataWriter->_update() in C:\xampp\htdocs\xf\library\XenForo\DataWriter.php at line 1609
XenForo_DataWriter->_save() in C:\xampp\htdocs\xf\library\XenForo\DataWriter.php at line 1405
XenForo_DataWriter->save() in C:\xampp\htdocs\xf\library\XenForo\ControllerAdmin\TemplateModificationAbstract.php at line 111
XenForo_ControllerAdmin_TemplateModificationAbstract->actionSave() in C:\xampp\htdocs\xf\library\XenForo\FrontController.php at line 347
XenForo_FrontController->dispatch() in C:\xampp\htdocs\xf\library\XenForo\FrontController.php at line 134
XenForo_FrontController->run() in C:\xampp\htdocs\xf\admin.php at line 13
 
Last edited:
Fixed now. The field in the DB is binary but the datawriter expected a string.

The key was actually only expected to contain a-z, 0-9, and _ but we haven't enforced that so we can't really change it right now.
 
Back
Top Bottom