honour77 LiteCart Fan From Canada Member since Jul 2015 honour77 May 16 2017 12:06 AM I just upgraded my development site to version 2. The front home page does not load the default template and I get the following error message:{snippet:notices} Fatal error: 1054 - Unknown column 's.languages' in 'where clause' select s.*, si.caption, si.link from `litecart`.`lc_slides` s left join `litecart`.`lc_slides_info` si on (s.id = si.slide_id and si.language_code = 'en') where s.status and (s.languages = '' or find_in_set('en', s.languages)) and (s.date_valid_from <= '2017-05-15 16:40:20') and (year(s.date_valid_to) < '1971' or s.date_valid_to >= '2017-05-15 16:40:20') order by s.priority, s.name; in ~/includes/library/lib_database.inc.php on line 220If I click on a category link it loads the template and looks exactly like it should. Click on the home button and it again gives me the above error with no template.I am using the default template with no changes.The admin section works perfectly.I have this installed on a windows 7 computer with Apache 2.4, PHP7.1.5 and MySQL5.5.55
tim Founder From Sweden Member since May 2013 tim May 16 2017 01:37 AM Were there any errors during your upgrade? You did go via install/upgrade.php yes?If you are out of backups and want to manually repair and update your installation do this:1. Install a new clean install of the desired version.2. Open phpMyAdmin and export the structure from both databases to an .sql file.3. Compare the differences.That should give you enough information what to repair.
honour77 LiteCart Fan From Canada Member since Jul 2015 honour77 May 16 2017 03:59 AM I went through the install/upgrade.php and there were no errors during the upgrade.It would appear that I have an issue with mysql. I tried to install a clean install of version 2. Everything on the install page is marked as ok. When I click install I received the following errors:Checking PHP version... 7.1.5 [OK]Checking PHP display_errors... On[OK]Connecting to database... Connected! [OK]Checking MySQL version... Warning: mysqli::__construct(): (HY000/1049): Unknown database 'litecart20' in C:\web\2017JoyStore-LiteCart\includes\library\lib_database.inc.php on line 12Warning: mysqli::set_charset(): Couldn't fetch mysqli in C:\web\2017JoyStore-LiteCart\includes\library\lib_database.inc.php on line 46Warning: Unknown MySQL character set for charset utf8 in C:\web\2017JoyStore-LiteCart\includes\library\lib_database.inc.php on line 84Warning: mysqli::query(): Couldn't fetch mysqli in C:\web\2017JoyStore-LiteCart\includes\library\lib_database.inc.php on line 122Warning: database::_error(): Couldn't fetch mysqli in C:\web\2017JoyStore-LiteCart\includes\library\lib_database.inc.php on line 220Fatal error: - select @@SESSION.sql_mode; in C:\web\2017JoyStore-LiteCart\includes\library\lib_database.inc.php on line 220I tried using litecart20 and liteshop as the database name as my original cart database is called litecart. I also tried modifying the table prefixes to lc2_ but that did not work either.Any ideas on what to try would be appreciated.
tim Founder From Sweden Member since May 2013 tim May 16 2017 10:45 PM If litecart20 is not a real database then it's not the database name to put in. See phpMyAdmin what your database is called and make sure the mysql user has access to it.
honour77 LiteCart Fan From Canada Member since Jul 2015 honour77 May 16 2017 11:44 PM I had not realized that I had to create the database before doing the install. I thought the installation process created the database automatically. Once I created the database before installing the install worked perfectly.I was able to compare the original and the new database files and found the error. In the lc-slides table in my original there was a line called column: language_code type: varchar(8). The new lc-slides table the line was column: languages type: varchar(32). Since I had not done anything with the slides feature, I simply deleted the original lc-slides table and copied over the new lc-slides table. The front page now loads perfectly.Thanks for your help.
user6107 Developer From Indonesia Member since Nov 2018 user6107 Nov 15 2018 04:15 AM Fatal error: 1054 - Unknown column 'text_id' in 'field list' update `litecart`.`lc_translations` set text_id = 'Referensi' where code = 'title_reference' limit 1; in ~/includes/library/lib_database.inc.php (Line 227)when i try import new language
tim Founder From Sweden Member since May 2013 tim Nov 15 2018 02:45 PM @user6107 Add the language before importing translations. Admin -> Languages.