In Admin: Catchable fatal error in html_output.php
Symptom: In the admin area, when accessing pages that have pulldown menus on them, you might occasionally see a "catchable fatal error in html_output.php".
Happens only in PHP5
Cause: leftover legacy code incompatible with PHP5
Solution: Interim workaround is available by using the patched files posted here:
http://www.zen-cart.com/forum/showpo...0&postcount=10
noindex,nofollow problem with Always Show Categories enabled
Symptom:
There's a bug in v1.3.8 which only shows when you have
Admin->Configuration->Layout Settings->Categories - Always Show on Main Page = 1
Solution:
To fix it, edit your /includes/init_includes/init_add_crumbs.php file, by adding the indicated code, as shown in the highlighted area:
Code:
if ($categories->RecordCount() > 0) {
$breadcrumb->add($categories->fields['categories_name'], zen_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));
} elseif(SHOW_CATEGORIES_ALWAYS == 0) {
// if invalid, set the robots noindex/nofollow for this page
$robotsNoIndex = true;
break;
}
http://www.zen-cart.com/forum/showthread.php?t=87093
Re: Linkpoint Error -- SGS-020003: Invalid XML
Symptom: "Invalid XML" errors when using the v1.3.8 LinkpointAPI payment module on orders which qualify for and select free-shipping.
Solution: http://www.zen-cart.com/forum/showth...397#post504397
Re: Known Bugs (and fixes) with v1.3.8
Problem: When deleting "ALL attributes" for a given product via the Attributes Controller, AND the product has Download Files attached to it, an error appears, saying:
Quote:
Fatal error: Cannot use object of type queryFactoryResult as array in /home/mysite/public_html/store/admin/includes/functions/general.php on line 2089
Solution: The coding fix for this particular situation is posted here:
http://www.zen-cart.com/forum/showthread.php?t=88609
Re: Known Bugs (and fixes) with v1.3.8
Minor issue:
Symptom: HTML-formatted emails generated by Tell-A-Friend always link to main default product-type. For example, if a product_music item was referenced, it would point to product_info instead of product_music_info in the URL.
Fix discussed here: http://www.zen-cart.com/forum/showthread.php?t=89606
Re: Known Bugs (and fixes) with v1.3.8
Symptom: Categories Meta Tags cannot be removed once added
http://www.zen-cart.com/forum/showthread.php?t=86882
Solution: Replace the code for the categories meta tags:
/admin/categories.php
And change the code for the categories meta tags to read:
PHP Code:
// bof: categories meta tags
case 'update_category_meta_tags':
// add or update meta tags
//die('I SEE ' . $action . ' - ' . $_POST['categories_id']);
$categories_id = $_POST['categories_id'];
$languages = zen_get_languages();
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
$language_id = $languages[$i]['id'];
$check = $db->Execute("select *
from " . TABLE_METATAGS_CATEGORIES_DESCRIPTION . "
where categories_id = '" . (int)$categories_id . "'
and language_id = '" . (int)$language_id . "'");
if ($check->RecordCount() > 0) {
$action = 'update_category_meta_tags';
} else {
$action = 'insert_categories_meta_tags';
}
$sql_data_array = array('metatags_title' => zen_db_prepare_input($_POST['metatags_title'][$language_id]),
'metatags_keywords' => zen_db_prepare_input($_POST['metatags_keywords'][$language_id]),
'metatags_description' => zen_db_prepare_input($_POST['metatags_description'][$language_id]));
if ($action == 'insert_categories_meta_tags') {
$insert_sql_data = array('categories_id' => $categories_id,
'language_id' => $language_id);
$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
zen_db_perform(TABLE_METATAGS_CATEGORIES_DESCRIPTION, $sql_data_array);
} elseif ($action == 'update_category_meta_tags') {
if (empty($_POST['metatags_title'][$language_id]) && empty($_POST['metatags_keywords'][$language_id]) && empty($_POST['metatags_description'][$language_id])) {
$remove_categories_metatag = "DELETE from " . TABLE_METATAGS_CATEGORIES_DESCRIPTION . " WHERE categories_id = '" . (int)$categories_id . "' and language_id = '" . (int)$language_id . "'";
$db->Execute($remove_categories_metatag);
} else {
zen_db_perform(TABLE_METATAGS_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "' and language_id = '" . (int)$language_id . "'");
}
}
}
zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories_id));
break;
// eof: categories meta tags
Re: Known Bugs (and fixes) with v1.3.8
Symptom: Product Meta Tag leaving blank record
Solution: update the file:
/admin/includes/modules/update_products_meta_tags.php
New Code:
PHP Code:
// check if new meta tags or existing
$check_meta_tags_description = $db->Execute("select products_id from " . TABLE_META_TAGS_PRODUCTS_DESCRIPTION . " where products_id='" . $products_id . "'");
if ($check_meta_tags_description->RecordCount() <= 0) {
$action = 'new_product_meta_tags';
}
$languages = zen_get_languages();
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
$language_id = $languages[$i]['id'];
$sql_data_array = array('metatags_title' => zen_db_prepare_input($_POST['metatags_title'][$language_id]),
'metatags_keywords' => zen_db_prepare_input($_POST['metatags_keywords'][$language_id]),
'metatags_description' => zen_db_prepare_input($_POST['metatags_description'][$language_id]));
if ($action == 'new_product_meta_tags') {
$insert_sql_data = array('products_id' => $products_id,
'language_id' => $language_id);
$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
zen_db_perform(TABLE_META_TAGS_PRODUCTS_DESCRIPTION, $sql_data_array);
} elseif ($action == 'update_product_meta_tags') {
if (empty($_POST['metatags_title'][$language_id]) && empty($_POST['metatags_keywords'][$language_id]) && empty($_POST['metatags_description'][$language_id])) {
$remove_products_metatag = "DELETE from " . TABLE_META_TAGS_PRODUCTS_DESCRIPTION . " WHERE products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'";
$db->Execute($remove_products_metatag);
} else {
zen_db_perform(TABLE_META_TAGS_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'");
}
}
}
zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')));
}
http://www.zen-cart.com/forum/showthread.php?t=86882
Re: Known Bugs (and fixes) with v1.3.8
Symptom:
Unknown column 'o.orders_id' in 'on clause' occurs in the Admin Orders screen when doing a search from the "Search by Product Name or ID:XX or Model" box (the standard "Search" box and Order ID searches work fine).
This happens on MySQL 5.0 and higher.
Solution:
In the /admin/orders.php, from lines 715 thru 750 there are three places where the following is found:
Code:
from (" . TABLE_ORDERS . " o, " .
TABLE_ORDERS_STATUS . " s " .
change each of those to this instead:
Code:
from (" . TABLE_ORDERS_STATUS . " s, " .
TABLE_ORDERS . " o " .
Posted and discussed here: http://www.zen-cart.com/forum/showth...384#post518384
Re: Known Bugs (and fixes) with v1.3.8
Problem: Back button not working in some instances and you go to the home page vs the last page
Solution: edit the file
/includes/functions/functions_general.php
around lines 989 - 1004 is the function:
PHP Code:
////
// Set back button
function zen_back_link() {
if (sizeof($_SESSION['navigation']->path)-2 > 0) {
$back = sizeof($_SESSION['navigation']->path)-2;
$link = '<a href="' . zen_href_link($_SESSION['navigation']->path[$back]['page'], zen_array_to_string($_SESSION['navigation']->path[$back]['get'], array('action')), $_SESSION['navigation']->path[$back]['mode']) . '">';
} else {
if (isset($_SERVER['HTTP_REFERER']) && strstr(HTTP_SERVER, $_SERVER['HTTP_REFERER'])) {
$link= $_SERVER['HTTP_REFERER'];
} else {
$link = '<a href="' . zen_href_link(FILENAME_DEFAULT) . '">';
}
$_SESSION['navigation'] = new navigationHistory;
}
return $link;
}
replace it with the following:
PHP Code:
////
// Set back button
function zen_back_link() {
if (sizeof($_SESSION['navigation']->path)-2 > 0) {
$back = sizeof($_SESSION['navigation']->path)-2;
$link = '<a href="' . zen_href_link($_SESSION['navigation']->path[$back]['page'], zen_array_to_string($_SESSION['navigation']->path[$back]['get'], array('action')), $_SESSION['navigation']->path[$back]['mode']) . '">';
} else {
if (isset($_SERVER['HTTP_REFERER']) && strstr($_SERVER['HTTP_REFERER'], HTTP_SERVER)) {
$link= '<a href="' . $_SERVER['HTTP_REFERER'].'">';
} else {
$link = '<a href="' . zen_href_link(FILENAME_DEFAULT) . '">';
}
$_SESSION['navigation'] = new navigationHistory;
}
return $link;
}
Thanks to Absolute for posting this current solution ...
Note: it has been tested to some degree but not to 100% satisfaction ... granted I cannot break it thus far so perhaps it has ... :cool: