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

Awaiting Feedback Import from IPB3.3, error on Polls

Discussion in 'Resolved Bug Reports' started by killtro, Jan 25, 2013.

  1. killtro

    killtro Member

    We are finishing our conversion to Xenforo from IPB3.3 (Yippie-Kai-Yay!)

    We are using Jake Bounce's patch from here: http://xenforo.com/community/threads/conversion-from-ip-board.33832/

    All fine, until polls get converted.
    We hit this error:
    http://i.imm.io/U2tp.png

    PHP:
    Server Error
     
    preg_match
    () expects parameter 2 to be string, array given
     
    XenForo_Application
    ::handlePhpError()
    preg_match() in XenForo/Importer/Abstract.php at line 157
    XenForo_Importer_Abstract
    ->_convertToUtf8()
    array_map() in XenForo/Importer/IPBoard.php at line 2937
    XenForo_Importer_IPBoard
    ->stepPolls() in XenForo/Importer/Abstract.php at line 77
    XenForo_Importer_Abstract
    ->runStep() in XenForo/ControllerAdmin/Import.php at line 180
    XenForo_ControllerAdmin_Import
    ->_runStep() in XenForo/ControllerAdmin/Import.php at line 132
    XenForo_ControllerAdmin_Import
    ->actionImport() in XenForo/FrontController.php at line 310
    XenForo_FrontController
    ->dispatch() in XenForo/FrontController.php at line 132
    XenForo_FrontController
    ->run() in /mnt/data/websites/antronioforo/html/admin.php at line 13
    So I went to Abstract.php line 157, and wrapped the whole if (preg_match('/[\x80-\xff]/', $string)) conditional with if(!is_array($string)) { }
    Like this:
    PHP:
            if(!is_array($string)) {
            if (
    preg_match('/[\x80-\xff]/'$string))
            {
                if (
    function_exists('iconv'))
                {
                    
    $string = @iconv($this->_charset'utf-8//IGNORE'$string);
                }
                else if (
    function_exists('mb_convert_encoding'))
                {
                    
    $string mb_convert_encoding($string'utf-8'$this->_charset);
                }
            }
            }

    After that, the importing keeps going without errors.

    Hope this helps someone else.
     
    tintolio likes this.
  2. Adam Howard

    Adam Howard Well-Known Member

    Do you have th exact version number?

    3.3.x

    IPB seemingly keeps changing their structure for each release. One would almost think that IPB is doing so to prevent people from porting away from IPB to anything else (phpBB, vBulletin, SMF, XenForo).

    Of course that's just my opinion.
     
  3. killtro

    killtro Member

    Sure: IP.Board 3.3.4
     
    tintolio and Adam Howard like this.
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I will need access to your IPB database in order to make a determination here. I can't be certain of a fix without seeing the data. Send me a PM if you are willing to give me access.
     
    Adam Howard likes this.
  5. OperaManiac

    OperaManiac Well-Known Member

    Hello. I am facing this problem on my conversion. Was this issue ever resolved?
     
  6. ColinD

    ColinD Member

    I just hit this on a test import from 3.4 at around 75% on my polls.

    For now I've applied the !if 'fix' and it's continued ok.
     

Share This Page