Page 1 of 1

Installation only half working

Posted: Mon Aug 22, 2022 6:45 pm
by Frumious
i
Just installed opencart on windows 10.
Admin side all working fine but when I attempt to view storefront all i get is this:

Warning: Attempt to read property "num_rows" on bool in C:\upload\catalog\model\catalog\product.php on line 8
Warning: Attempt to read property "num_rows" on bool in C:\upload\catalog\model\catalog\product.php on line 8
Warning: Attempt to read property "num_rows" on bool in C:\upload\catalog\model\catalog\product.php on line 8
Warning: Attempt to read property "num_rows" on bool in C:\upload\catalog\model\catalog\product.php on line 8
Warning: Attempt to read property "rows" on bool in C:\upload\catalog\model\catalog\category.php on line 13
TypeError: Opencart\Catalog\Model\Catalog\Category::getCategories(): Return value must be of type array, null returned in C:\upload\catalog\model\catalog\category.php on line 13.

Any ideas please?
TIA

Re: Installation only half working

Posted: Tue Aug 23, 2022 2:12 am
by koku
OpenCart version?
PHP version?

Re: Installation only half working

Posted: Tue Aug 23, 2022 2:13 am
by koku
Actually its opencart 4 :)
So, what is the PHP version?

Re: Installation only half working

Posted: Fri Aug 26, 2022 9:32 pm
by Bat83149
Hi,

Same issue for me, except that even in the admin panel i get the error.
Open cart Version 4.0.1.0
PHP version : 8.0.13
MySQL Version : 5.7.36
I am using WAMP.

Thks for the help ;-)

Re: Installation only half working

Posted: Mon Aug 29, 2022 9:55 pm
by knowband.plugins
The DB tables are not installed correctly that's the reason for the error.

If you will check the database then you will find the product_description, and category_description types of tables will be missing.

There will be the following entries in the Error log i.e.

Exception: Error: SQLSTATE[HY000]: General error: 1709 Index column size too large.

We have fixed the issue by updating the MySQL server settings

Changed
innodb-default-row-format=compact
to
innodb-default-row-format=dynamic

in mysql.ini

Reference
https://stackoverflow.com/questions/307 ... -767-bytes

Changes need to be done on the MySQL server settings so I m not sure if this kind of setting change is possible for you OR not.

Need to install the opencart again after making these changes.