Forums / Basic Configuration / Admin won't load any products

Admin won't load any products

Views: 1,901

Results 1 to 7 of 7
19 Jan 2022, 9:34 PM
#1
spacebiscuit75 avatar

spacebiscuit75

New Zenner

Join Date:
Jan 2022
Posts:
3
Plugin Contributions:
0

Admin won't load any products

I've done a fresh install of v1.5.7c

I have installed a free template but the admin remains untoched and is the original. I am trying to edit a product, when I select 'Categories/Products' nothing loads, there is just a blank space aqnd ZenCart logo.

I've looked into the categories.php in the admin/includes folder:

$categoryId = (isset($_GET['cID']) ? (int)$_GET['cID'] : '');
if ($categoryId != '') {
  $category = $db->Execute("SELECT c.categories_id, cd.categories_name, cd.categories_description, c.categories_image,
                                   c.sort_order, c.date_added, c.last_modified
                            FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
                            WHERE c.categories_id = " . $categoryId . "
                            AND c.categories_id = cd.categories_id
                            AND cd.language_id = " . (int)$_SESSION['languages_id']);
  $cInfo->updateObjectInfo($category->fields);
}

Since by default the cID parameter is not passed then the select won't be executed, so I can't see how this would ever work.

Any ideas?

19 Jan 2022, 10:00 PM
#2
swguy avatar

swguy

Administrator

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

Re: Admin won't load any products

when you select Categories/Products it should load

http://YOURSITE.com/admin/index.php?cmd=category_product_listing

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.

19 Jan 2022, 10:18 PM
#3
spacebiscuit75 avatar

spacebiscuit75

New Zenner

Join Date:
Jan 2022
Posts:
3
Plugin Contributions:
0

Re: Admin won't load any products

that is the url yes- but as mentioned no content is loaded.

I can force the content by doing this at around line 30:

$action = (isset($_GET['action']) ? $_GET['action'] : 'update_category_meta_tags');

I changed it from:

$action = (isset($_GET['action']) ? $_GET['action'] : '');

Why does the ternery function default to an empty string?

20 Jan 2022, 2:39 AM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Admin won't load any products

Sounds like a partial blank screen issue which likely has generated a mydebug-adm type log file in the logs directory that should have more information about what is going on that is unless the logo described is at the bottom of the screen as in the footer area.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

20 Jan 2022, 11:21 AM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Admin won't load any products

spacebiscuit75:

that is the url yes- but as mentioned no content is loaded.

I can force the content by doing this at around line 30:

$action = (isset($_GET['action']) ? $_GET['action'] : 'update_category_meta_tags');

> 
> I changed it from:
> 
> ```
$action = (isset($_GET['action']) ? $_GET['action'] : '');

Why does the ternery function default to an empty string?

Line 30? That ternary evaluation is performed at line 15 of a default install. So what modifications are incorporated to push that down an additional 15ish lines? And why does using update_category_meta_tags in admin/category_product_listing.php do anything when that term does not even exist in this file?

When claiming a fresh install of v157c, what is the origin of the database? Is it blank, have demo product or was a database imported from some other store?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

20 Jan 2022, 9:56 PM
#6
spacebiscuit75 avatar

spacebiscuit75

New Zenner

Join Date:
Jan 2022
Posts:
3
Plugin Contributions:
0

Re: Admin won't load any products

Seems that I had installed some patched SQL from a theme which I guess has broken some config. I did a fresh install and brought eh config and admin tables over to fix it. Apologies.

Has been a good exercise though, I got to see a little under the hood regarding config etc.

20 Jan 2022, 11:09 PM
#7
swguy avatar

swguy

Administrator

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

Re: Admin won't load any products

I look forward to future pull requests from you, grasshopper! :)

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.