Blank shop home page

Open to all! Ask other shopowners for help.
raiwa
Certified Developer
Posts: 1640
Joined: Sat Dec 21, 2019 8:08 am
Phoenix Version: 1.1.0.6
Has thanked: 70 times
Been thanked: 152 times

Re: Blank shop home page

Post by raiwa »

See this tread:
https://phoenixcart.org/forum/viewtopi ... ngth#p6222
And there this post:
ecartz wrote: Wed Sep 15, 2021 12:40 pm Please set the tables to InnoDB. E.g.

Code: Select all

CREATE TABLE action_recorder (
  id int NOT NULL auto_increment,
  module varchar(255) NOT NULL,
  user_id int,
  user_name varchar(255),
  identifier varchar(255) NOT NULL,
  success char(1),
  date_added datetime NOT NULL,
  PRIMARY KEY (id),
  KEY idx_action_recorder_module_date (module, date_added),
  KEY idx_action_recorder_user_id (user_id)
) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci Engine InnoDB
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27


Join The Code Co-op to get access to your library in the Code Co-op Forum
tedukes
Member
Posts: 87
Joined: Wed Oct 27, 2021 11:27 pm
Phoenix Version:
Has thanked: 17 times
Been thanked: 1 time

Re: Blank shop home page

Post by tedukes »

Thanks!!

It was a new empty db.

Just mentioned it because someone previously said they thought my configuration table was bad.

I did upgrade from 1.0.8.8 to 1.0.8.9 using the upgrader back on 12/28. Did a file and db backup prior to doing so. Pretty sure everything was working when it completed. I don't usually access the shop side, just the admin side, unless I'm adding a product or addon.
cdgo
Member
Posts: 7
Joined: Sat Feb 25, 2023 12:07 pm
Phoenix Version:

Re: Blank shop home page

Post by cdgo »

For future reference.
After leaving the test installation for a month or so I started it again today.
And had the same "PHP Notice: Undefined index: language in /home/xxxxxxxxxxx/public_html/shop/includes/system/versioned/1.0.8.2/language.php on line 167" messages.

So it appears that for some reason this was not run:
includes/classes/application.php line 49:
public function set_session_language() {
if (empty($_SESSION['language']) || isset($_GET['language'])) {
$GLOBALS['lng'] = language::build();

$GLOBALS['languages_id'] =& $_SESSION['languages_id'];
$GLOBALS['language'] =& $_SESSION['language'];
}

class_exists('Text');
$GLOBALS['oscTemplate'] =& Guarantor::ensure_global('Template');
$GLOBALS['class_index']->set_translator('language::map_to_translation');
$this->fix_numeric_locale();
return language::map_to_translation('.php');
}

So quick and dirty solution to fix it is to do this change:
includes/system/versioned/1.0.8.2/language.php line 166:
if (is_null($language)) {
$language = $_SESSION['language'];
}

to:
if (is_null($language)) {
if (isset($_SESSION['language'])) {
$language = $_SESSION['language'];
} else {
$GLOBALS['lng'] = language::build();
$GLOBALS['languages_id'] =& $_SESSION['languages_id'];
$GLOBALS['language'] =& $_SESSION['language'];
}
}

I haven't dived in the core yet, so not sure where it actually goes wrong, or why.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply