I'm currently testing to update website to ZC Ver. 1.5.6
However, as I am trying to install Multi Cross Sell. I run into error when I tried to update configuration in admin.
(Configuration -> Cross Sell Settings)
Try to change anythings and I will get into this error in the log...
[03-Jan-2019 19:12:24 UTC] Request URI: /zc156/adm/configuration.php?gID=43&cID=916&action=save, IP address: xxx.xxx.xxx.xxx
#1 trigger_error() called at [/home/user/public_html/zc156/includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/home/user/public_html/zc156/includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [/home/user/public_html/zc156/includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at [/home/user/public_html/zc156/adm/configuration.php:26]
--> PHP Fatal error: 1054:Unknown column 'val_function' in 'field list' :: SELECT val_function FROM configuration WHERE configuration_id = '916' ==> (as called by) /home/user/public_html/zc156/adm/configuration.php on line 26 <== in /home/user/public_html/zc156/includes/classes/db/mysql/query_factory.php on line 171.
So, the SQL is not valid.
I ran in PhpMyAdmin and I got same result...
SQL query: Documentation
SELECT val_function FROM configuration WHERE configuration_id = '916' LIMIT 0, 25
MySQL said: Documentation
#1054 - Unknown column 'val_function' in 'field list'
I check configuration.php on admin file. It seems the problematic line is on this part...
$configuration_value = zen_db_prepare_input($_POST['configuration_value']);
// See if there are any configuration checks
$checks = $db->Execute("SELECT val_function FROM " . TABLE_CONFIGURATION . " WHERE configuration_id = '" . (int)$cID . "'");
if (!$checks->EOF && $checks->fields['val_function'] != NULL) {
require_once('includes/functions/configuration_checks.php');
zen_validate_configuration_entry($configuration_value, $checks->fields['val_function']);
}
This part is on ZC 1.5.6 and that code was NOT work like that in ZC 1.5.1 (my current store version).
I do not think "val_function" exist anywhere in database... and it is hard coded there. I wonder is this intended for other functions or not?
-PanZC2020