XF 1.5 illegal mix of collations during import from vBulletin

Boothby

Well-known member
During the import process of vBulletin 3.8 I was getting the following error.

Server Error
Mysqli statement execute error : Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 825
  4. Zend_Db_Adapter_Abstract->fetchOne() in XenForo/Importer/vBulletin.php at line 2801
  5. XenForo_Importer_vBulletin->stepContentTags() in XenForo/Importer/Abstract.php at line 124
  6. XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 189
  7. XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 137
  8. XenForo_ControllerAdmin_Import->actionImport() in XenForo/FrontController.php at line 351
  9. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  10. XenForo_FrontController->run() in /www/htdocs/stftvb/forum/xf/admin.php at line 13

I finished the import of users, forums, posts and a lot other stuff without problems.
 
Thanks, that was the right tip for further investigations. All tables are on latin1_swedish_ci. The tags had some items with umlauts.

I changed vbulletin.php at line 2791 to:

PHP:
$tagId = $sDb->fetchOne('
    SELECT tagid
    FROM ' . $prefix . 'tag
    WHERE tagtext = ?
', utf8_encode($tagText)); // <-- this
 
Back
Top Bottom