Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2006
    Location
    Worcester, MA
    Posts
    453
    Plugin Contributions
    0

    Default Unknown column 'val_function' in 'field list

    I'm at the final step o an upgrade I'm doing for a client. Finished all the testing in the 1.5.6 version shop and ready to refresh data and change directory names so the upgraded version will become the live version. I was at the step of putting both shops into DOWN FOR MAINTENANCE. But I can't seem to change any values in the Website Maintenance admin on the 1.5.6 shop. I get an error of:

    WARNING: An Error occurred, please refresh the page and try again.If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

    And in the logs, the error I see is:

    [09-Feb-2019 11:17:27 America/New_York] Request URI: /store_upgrade/MY_ADMIN/configuration.php?gID=20&cID=446&action=save, IP address: 71.87.210.6
    #1 trigger_error() called at [/PATH/store_upgrade/includes/classes/db/mysql/query_factory.php:171]
    #2 queryFactory->show_error() called at [/PATH/store_upgrade/includes/classes/db/mysql/query_factory.php:143]
    #3 queryFactory->set_error() called at [/PATH/store_upgrade/includes/classes/db/mysql/query_factory.php:270]
    #4 queryFactory->Execute() called at [/PATH/store_upgrade/MY_ADMIN/configuration.php:26]
    --> PHP Fatal error: 1054:Unknown column 'val_function' in 'field list' :: SELECT val_function FROM zc_configuration WHERE configuration_id = '446' ==> (as called by) /PATH/store_upgrade/MY_ADMIN/configuration.php on line 26 <== in /PATH/store_upgrade/includes/classes/db/mysql/query_factory.php on line 171.

    Not sure how to solve this. Any suggestions where to look?
    Ellie Armsby

  2. #2
    Join Date
    Oct 2006
    Location
    Worcester, MA
    Posts
    453
    Plugin Contributions
    0

    Default Re: Problem putting into down for maintenance

    Just an update, it actually seems as though I can not change any configuration values. I haven't tried everything of course, but the several things I tried to update all under configuration, all failed with similar errors.
    Ellie Armsby

  3. #3
    Join Date
    Oct 2006
    Location
    Worcester, MA
    Posts
    453
    Plugin Contributions
    0

    Default Re: Problem putting into down for maintenance

    Digging a bit further, I compared the configuration table between my "upgraded" database and the clean 1.5.6 table and I can see that the clean 1.5.6 table has a field named val_function but the supposedly upgraded one does not. Can I assume that the table didn't actually get upgraded when I did the database upgrade? Is there a way to force this or something I can do to fix whatever prevented it upgrading in the first place?

    I thought I was on the home stretch to finishing this upgrade but now I'm a bit stumped.
    Ellie Armsby

  4. #4
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Problem putting into down for maintenance

    Perhaps more than just the one field was affected; however, I would suggest grabbing the zc_install directory from the github repo: https://github.com/zencart/zencart/tree/v156 where it has an update to address a date/datetime issue that tends to get in the way of updating table records. Then run the zc_install upgrade again. Before attempt to log into the admin, check the logs directory for problems related to the database upgrade and seek to address them.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Oct 2006
    Location
    Worcester, MA
    Posts
    453
    Plugin Contributions
    0

    Default Re: Problem putting into down for maintenance

    Thanks for that tip. I'm doing that now and will see what errors come up in the logs directory.
    Ellie Armsby

  6. #6
    Join Date
    Oct 2006
    Location
    Worcester, MA
    Posts
    453
    Plugin Contributions
    0

    Default Re: Problem putting into down for maintenance

    Woohoo! Re-running zc_install using the newer version you posted did the trick. I did check the log files and all the errors seem to have to do with duplicate columns in other tables. I'm guessing/assuming that these errors were all because the database upgrade was trying to change the tables that had already been successfully upgraded the first time I ran the upgrade.
    Ellie Armsby

  7. #7
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Problem putting into down for maintenance

    Quote Originally Posted by earmsby View Post
    Woohoo! Re-running zc_install using the newer version you posted did the trick. I did check the log files and all the errors seem to have to do with duplicate columns in other tables. I'm guessing/assuming that these errors were all because the database upgrade was trying to change the tables that had already been successfully upgraded the first time I ran the upgrade.
    The duplicate issues would most likely yes be because of re-running the zc_install, but also because there are some operations in the recent install scripts that have been there for several versions to make sure that the new version works as expected.

    Good, glad that helped get there without having to redo too much. DrB, Wilt, Ajeh and the rest of that team do it again. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Replies: 4
    Last Post: 28 Dec 2018, 06:39 PM
  2. v155 Unknown column 'stripe_card_token' in 'field list'
    By Ron44124 in forum Upgrading to 1.5.x
    Replies: 1
    Last Post: 11 Nov 2016, 06:59 PM
  3. Unknown column 'zen_order_id' in 'field list'
    By rramirezb in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 4 Sep 2008, 07:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR