Zen Cart Logo
Forums / Bug Reports / [Done v156a] Admin>Configuration Unknown column 'val_function' in 'field list

[Done v156a] Admin>Configuration Unknown column 'val_function' in 'field list

Views: 1,849

Results 1 to 5 of 5
28 Dec 2018, 02:43
#1
stellarweb avatar

stellarweb

Zen Follower

Join Date:
May 2006
Location:
Montana
Posts:
293
Plugin Contributions:
8

[Done v156a] Admin>Configuration Unknown column 'val_function' in 'field list

PHP
PHP Version: 7.1.25 (Zend: 3.1.0)
Here are a few things I have tried to change under configuration menu:

Trying to change Down For Maintenance to False
My Store>Telephone-Customer service - add info
Customer Details>Email Salutation, etc etc etc

WARNING: An Error occurred, please refresh the page and try again.

Error log says

[27-Dec-2018 23:32:39 UTC] Request URI: /admin/configuration.php?gID=1&cID=3&action=save, IP address: 67.143.193.32
#1 trigger_error() called at [/home/xxxxx/public_html/includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/home/xxxxx/public_html/includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [/home/xxxxx/public_html/includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at [/home/xxxxx/public_html/admin/configuration.php:26]

[27-Dec-2018 23:32:39 UTC] PHP Fatal error: 1054:Unknown column 'val_function' in 'field list' :: SELECT val_function FROM configuration WHERE configuration_id = '3' ==> (as called by) /home/xxxxx/public_html/admin/configuration.php on line 26 <== in /home/xxxxx/public_html/includes/classes/db/mysql/query_factory.php on line 171

Is anyone else experiencing this?

Thanks!

28 Dec 2018, 03:52
#2
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: [Done v156a] Admin>Configuration Unknown column 'val_function' in 'field list

stellarweb:

PHP
PHP Version: 7.1.25 (Zend: 3.1.0)
Here are a few things I have tried to change under configuration menu:

Trying to change Down For Maintenance to False
My Store>Telephone-Customer service - add info
Customer Details>Email Salutation, etc etc etc

WARNING: An Error occurred, please refresh the page and try again.

Error log says

[27-Dec-2018 23:32:39 UTC] Request URI: /admin/configuration.php?gID=1&cID=3&action=save, IP address: 67.143.193.32
#1 trigger_error() called at [/home/xxxxx/public_html/includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/home/xxxxx/public_html/includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [/home/xxxxx/public_html/includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at [/home/xxxxx/public_html/admin/configuration.php:26]

[27-Dec-2018 23:32:39 UTC] PHP Fatal error: 1054:Unknown column 'val_function' in 'field list' :: SELECT val_function FROM configuration WHERE configuration_id = '3' ==> (as called by) /home/xxxxx/public_html/admin/configuration.php on line 26 <== in /home/xxxxx/public_html/includes/classes/db/mysql/query_factory.php on line 171

Is anyone else experiencing this?

Thanks!
Only when/if the upgrade hasn't completed successfully (ie. not all queries have been run).

What is the history of this particular site and in particular the database?.

28 Dec 2018, 03:55
#3
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: [Done v156a] Admin>Configuration Unknown column 'val_function' in 'field list

For this particular issue (and this one issue only) the following query could be run in the install sql patches under the tools menu:

ALTER TABLE configuration ADD val_function text default NULL AFTER set_function;

Then you should be able to at least work with the down for maintenance section, though shouldn't the store already be in down for maintenance when doing the upgrade?

28 Dec 2018, 17:17
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: [Done v156a] Admin>Configuration Unknown column 'val_function' in 'field list

The failure to add the val_function field in the configuration table is most likely caused by a prior MySQL error about invalid dates in the existing records of that table.

Running the command shown at https://github.com/zencart/zencart/commit/058de1ea2413bfdf3d6fc4ca8d40f1db63319d57 will fix those dates.
After that you can run the ALTER TABLE statement as mentioned above.

28 Dec 2018, 17:39
#5
stellarweb avatar

stellarweb

Zen Follower

Join Date:
May 2006
Location:
Montana
Posts:
293
Plugin Contributions:
8

Re: [Done v156a] Admin>Configuration Unknown column 'val_function' in 'field list

Whoo hoo!! That worked! Never seen that happen before - the install and upgrade went through the way it normally does, no issues, so I was surprised when I started trying to change things that it wouldn't work.
Thanks!!