I just wanted to lend a hand for anyone experiencing this problem. After searching to no end I found the cause finally in the \includes\functions\functions_lookups file in the following line:
Code:
function zen_get_info_page($zf_product_id) {
global $db;
$sql = "select products_type from " . TABLE_PRODUCTS . " where products_id = '" . (int)$zf_product_id . "'";
$zp_type = $db->Execute($sql);
if ($zp_type->RecordCount() == 0) {
return 'product_info';
} else {
$zp_product_type = $zp_type->fields['products_type'];
$sql = "select type_handler from " . TABLE_PRODUCT_TYPES . " where type_id = '" . (int)$zp_product_type . "'";
$zp_handler = $db->Execute($sql);
return $zp_handler->fields['type_handler'] . '_info';
}
}
Note the else statement showing NO records found indicating no product type. The page returned will cause the link to the product page to appear as "_info" NOT "product_info" if no type found. So the root cause, yup plain old operator error. You MUST load a product type and sometimes this is easily missed when doing mass loads. So if your links are broken and product pages are giving 404 errors due to the URL construct of "_info" without the word "product" in the link, then most likely you have not specified a product type when loading data or doing sql updates.
The function "zen_get_info_page" is called in multiple areas and will return the same without the product type. Hope I saved someone frustration by finding a simple error!!!
LINK LOOKS LIKE: Link would read something like /index.php?main_page=_info&cPath=16_43&products_id=2493
SHOULD BE: /index.php?main_page=product_info&cPath=16_43&products_id=2493
Bookmarks