OpenContract works well, but admin returns blank page
I am confused about my opencart website since I migrated my website from ftp server to my localhost using MAMP. I couldn't get it to work as / admin only returns a black page for me. I checked my PHP logs:
[23-Jul-2015 12:48:16 Europe/Paris] PHP Notice: Undefined index: in /Applications/MAMP/htdocs/uta/admin/index.php on line 151
[23-Jul-2015 12:48:16 Europe/Paris] PHP Notice: Undefined index: in /Applications/MAMP/htdocs/uta/admin/index.php on line 152
[23-Jul-2015 12:48:16 Europe/Paris] PHP Notice: Undefined index: in /Applications/MAMP/htdocs/uta/admin/index.php on line 156
[23-Jul-2015 12:48:16 Europe/Paris] PHP Notice: Undefined index: in /Applications/MAMP/htdocs/uta/admin/index.php on line 157
[23-Jul-2015 12:48:16 Europe/Paris] PHP Notice: Undefined index: in /Applications/MAMP/htdocs/uta/system/library/Translation.php on line 371
[23-Jul-2015 12:48:16 Europe/Paris] PHP Notice: Undefined index: in /Applications/MAMP/htdocs/uta/system/library/Translation.php on line 371
[23-Jul-2015 12:48:16 Europe/Paris] PHP Notice: Undefined index: in /Applications/MAMP/htdocs/uta/system/library/Translation.php on line 371
[23-Jul-2015 12:48:16 Europe/Paris] PHP Notice: Undefined index: in /Applications/MAMP/htdocs/uta/system/library/Translation.php on line 371
$config->set('config_language_id', $languages[$code]['language_id']);
$config->set('config_admin_language', $languages[$code]['code']);
$config->set('config_language_default', $languages['fr']['language_id']);
// Language
$language = new Language($languages[$config->get('config_admin_language')] ['directory']);
$language->load($languages[$config->get('config_admin_language')]['filename']);
$registry->set('language', $language);
private function loadFile($language_id, $filename)
{
$code = $this->languages[$language_id]['code'];
$file = $this->lang_root . $code . '/' . $filename . $this->file_ext;
if (file_exists($file)) {
$_lang = array();
include $file;
$this->translations[$filename][$language_id] = $_lang;
} else {
$this->translations[$filename][$language_id] = array();
}
}
While I'm pretty sure my 2 config.php is set up correctly, if it's wrong php log will give me back some errors that I'm guessing.
So is there anyone who can give me a hint on what this notification means? And how to get / admin works well. Thank you in advance.
error_log (var_export ($ languages, true)) shows me:
array (
'en' =>
array (
'language_id' => '1',
'name' => 'English',
'code' => 'en',
'locale' => 'en_US.UTF-8,en_US,en-gb,english',
'image' => 'gb.png',
'directory' => 'english',
'filename' => 'startup',
'sort_order' => '1',
'status' => '1',
),
'fr' =>
array (
'language_id' => '2',
'name' => 'Français',
'code' => 'fr',
'locale' => 'fr_CA.UTF-8,fr_FR.UTF-8,fr_CA,fr_FR,fr-fr,french',
'image' => 'fr.png',
'directory' => 'french',
'filename' => 'startup',
'sort_order' => '0',
'status' => '1',
),
'ru' =>
array (
'language_id' => '3',
'name' => 'Russian',
'code' => 'ru',
'locale' => 'ru,ru_RU,ru_RU.UTF-8',
'image' => 'ru.png',
'directory' => 'russian',
'filename' => 'startup',
'sort_order' => '2',
'status' => '1',
),
)
error_log (var_export ($ this-> languages, true)) shows me:
array (
1 =>
array (
'code' => 'en',
'name' => 'English',
'img' => 'gb.png',
'id' => '1',
),
2 =>
array (
'code' => 'fr',
'name' => 'Français',
'img' => 'fr.png',
'id' => '2',
),
3 =>
array (
'code' => 'ru',
'name' => 'Russian',
'img' => 'ru.png',
'id' => '3',
),
)
+3
source to share