XF 2.0 Error while moving an installation from Windows to MAC

abdfahim

Well-known member
I am trying to migrate my local installation of XF 2.0.0 from my Windows machine (I am using EasyPhp for a WAMP server) to a new Macbook pro (using Scotchpro for a LAMP server).

I copied the whole XF directory and MySQL dump as it is to the new machine. However, I am getting the following error while trying to load the page on the browser:

Code:
An exception occurred: [ErrorException] [E_NOTICE] Undefined index: defaultLanguageId in src/XF/App.php on line 945

XF::handlePhpError() in src/XF/App.php at line 945
XF\App->XF\{closure}() in src/XF/Container.php at line 228
XF\Container->create() in src/XF/App.php at line 2271
XF\App->language() in src/XF/Pub/App.php at line 118
XF\Pub\App->start() in src/XF/App.php at line 1859
XF\App->run() in src/XF.php at line 328
XF::runApp() in index.php at line 13

There is no issue in the Windows machine though. Can anyone help, please?
 
To update, when I tried to dump the variable in question, it indeed returns empty

PHP:
$container->factory('language', function($id, array $params, Container $c)
        {
            $id = intval($id);

            $cache = $c['language.cache'];
            if (!$id || !isset($cache[$id]))
            {


                var_dump($c['options']); // ADDED THIS CODE


                $id = $c['options']['defaultLanguageId'];
            }


Code:
Output:

/var/www/public/xflive/src/XF/App.php:945:
array (size=0)
  empty
 
This likely means that your DB move wasn't fully/correctly done.

Saying that, you can probably do a master data rebuild via /install/ and that should rebuild most data.
 
Back
Top Bottom