If this is your first visit, check our documentation. To post, register or login.
Forums / Upgrading Your Zen Cart / Upgrading to 2.x.x / upgrade seemed to go as planned but no products are visible, just blank pages

upgrade seemed to go as planned but no products are visible, just blank pages

Started by johnniejetski2 on 23 Aug 2024, 3:03 AM · Views: 1,236

Results 1 to 7 of 7
23 Aug 2024, 3:03 AM
#1
johnniejetski2 avatar

johnniejetski2

New Zenner

Join Date:
Dec 2017
Location:
FLAH-DUH
Posts:
45
Plugin Contributions:
0

Post #1 by johnniejetski2

bladezscooters.com
1.5.7 to 2.0.1
no plugins
php 8.3

23 Aug 2024, 1:00 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #2 by lat9

"Just blank pages" implies that there are PHP errors preventing the display of the page(s). Check the site's /logs directory and, post them here using the "CODE" tags (the big **# **in the menu-bar as you write your response).

23 Aug 2024, 3:26 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #3 by drbyte

I see that your site shows Categories, but within each category it says "there are no products to display".

That makes me wonder whether your upgrade changed a DB_PREFIX setting, and then you had an empty new store, and you manually recreated your categories by hand, but the products are missing.
In that case, your database will contain two sets of tables: those starting with a common prefix, and another set starting with another common prefix (or no prefix). ie: "categories" vs "zen_categories" and "products" vs "zen_products".
Finding out what DB_PREFIX was in your /includes/configure.php "before" the upgrade, and putting that back, would restore your data. You might need to re-run zc_install again.

Or, zc_install didn't actually complete its upgrade, and that's resulting in some data not matching up properly (products not linked to their categories).

Also, you probably changed from an old PHP version with v1.5.7 ... and it's possible that there are PHP code fragments from the old store that got carried into the new one but are triggering PHP errors due to incompatibilities with the newer PHP version.

Like lat9 mentioned, looking in the /logs/ directory for zcInstall-DEBUG-xxxxx.log files and other myDEBUG-xxxxxx.log files will expose clues to any PHP errors that are occurring.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

23 Aug 2024, 6:45 PM
#4
johnniejetski2 avatar

johnniejetski2

New Zenner

Join Date:
Dec 2017
Location:
FLAH-DUH
Posts:
45
Plugin Contributions:
0

Post #4 by johnniejetski2

[23-Aug-2024 05:54:44 UTC] PHP Warning: Undefined array key "http_server_catalog" in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 80
[23-Aug-2024 05:54:44 UTC] PHP Warning: Undefined array key "http_server_catalog" in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 81
[23-Aug-2024 05:54:44 UTC] PHP Warning: Undefined array key "http_url_catalog" in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 81
[23-Aug-2024 05:54:44 UTC] PHP Deprecated: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 81
[23-Aug-2024 05:54:44 UTC] PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 81
[23-Aug-2024 05:54:44 UTC] PHP Warning: Undefined array key "https_server_catalog" in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 83
[23-Aug-2024 05:54:44 UTC] PHP Warning: Undefined array key "https_server_catalog" in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 84
[23-Aug-2024 05:54:44 UTC] PHP Warning: Undefined array key "https_url_catalog" in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 84
[23-Aug-2024 05:54:44 UTC] PHP Deprecated: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 84
[23-Aug-2024 05:54:44 UTC] PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 84

25 Aug 2024, 1:07 AM
#5
johnniejetski2 avatar

johnniejetski2

New Zenner

Join Date:
Dec 2017
Location:
FLAH-DUH
Posts:
45
Plugin Contributions:
0

Post #5 by johnniejetski2

DrByte:

I see that your site shows Categories, but within each category it says "there are no products to display".

That makes me wonder whether your upgrade changed a DB_PREFIX setting, and then you had an empty new store, and you manually recreated your categories by hand, but the products are missing.
In that case, your database will contain two sets of tables: those starting with a common prefix, and another set starting with another common prefix (or no prefix). ie: "categories" vs "zen_categories" and "products" vs "zen_products". db has only 1 set of tables

Finding out what DB_PREFIX was in your /includes/configure.php "before" the upgrade, and putting that back, would restore your data.
previous configure.php:
define('DB_TYPE', 'mysql'); // always 'mysql'
define('DB_PREFIX', ''); // prefix for database table names -- preferred to be left empty
define('DB_CHARSET', 'utf8mb4'); // 'utf8mb4' or older 'utf8' / 'latin1' are most common
define('DB_SERVER', 'localhost'); // address of your db server

2.0.1 configure.php
define('DB_TYPE', 'mysql'); // always 'mysql'
define('DB_PREFIX', ''); // prefix for database table names -- preferred to be left empty
define('DB_CHARSET', 'utf8mb4'); // 'utf8mb4' or older 'utf8' / 'latin1' are most common
define('DB_SERVER', 'localhost'); // address of your db server
they look identical to me

You might need to re-run zc_install again.

I have created 4 databases and done the install on each, with same results

Or, zc_install didn't actually complete its upgrade, and that's resulting in some data not matching up properly (products not linked to their categories).
each time it says the upgrade is complete

Also, you probably changed from an old PHP version with v1.5.7 Yes, 7.4 ... and it's possible that there are PHP code fragments from the old store that got carried into the new one but are triggering PHP errors due to incompatibilities with the newer PHP version. not sure how to test for that

Like lat9 mentioned, looking in the /logs/ directory for zcInstall-DEBUG-xxxxx.log files and other myDEBUG-xxxxxx.log files will expose clues to any PHP errors that are occurring.

[23-Aug-2024 05:54:44 UTC] PHP Warning: Undefined array key "http_server_catalog" in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 80
[23-Aug-2024 05:54:44 UTC] PHP Warning: Undefined array key "http_server_catalog" in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 81
[23-Aug-2024 05:54:44 UTC] PHP Warning: Undefined array key "http_url_catalog" in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 81
[23-Aug-2024 05:54:44 UTC] PHP Deprecated: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 81
[23-Aug-2024 05:54:44 UTC] PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 81
[23-Aug-2024 05:54:44 UTC] PHP Warning: Undefined array key "https_server_catalog" in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 83
[23-Aug-2024 05:54:44 UTC] PHP Warning: Undefined array key "https_server_catalog" in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 84
[23-Aug-2024 05:54:44 UTC] PHP Warning: Undefined array key "https_url_catalog" in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 84
[23-Aug-2024 05:54:44 UTC] PHP Deprecated: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 84
[23-Aug-2024 05:54:44 UTC] PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/bladez5/bladezscooters.com/zc_install/includes/modules/pages/database/header_php.php on line 84

26 Aug 2024, 8:38 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #6 by drbyte

As a follow-up, upon deeper investigation into zc_install DEBUG logs, we discovered that the products table had a record whose products_date_added date was '2000-00-00 09:00:00'. The month/day of 00-00 is invalid, and so MySQL was blocking the structural changes that the upgrade was attempting to do, thus not all of the upgrade steps were completing, due to errors.
It's unknown why the original data in the old database had the strange date.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

27 Aug 2024, 11:36 AM
#7
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Post #7 by swguy

Thanks for tracking this down, @DrByte. A reminder has been added to the upgrade instructions to check zc_install logs, which report this kind of problem.

Ideally you find this in a test update, and can fix the issue in your live database and then re-run zc_install. If not, you have to re-run the failed database updates by hand. This is documented in:

https://docs.zen-cart.com/user/upgrading/unknown_column/

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.