Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    7,455
    Plugin Contributions
    8

    Default Problem Editing Product Layout Settings

    1.5.6c upgraded using DrByte rebuild versus upgrade
    Apache
    PHP 7.2.27
    MySQL 5.7.29


    Square
    Responsive Color Changes
    Encrypted Master Password
    One-Page Checkout
    DbIo Manager
    Sitemap XML
    Access Blocker
    Edit Orders
    News Box Manager
    Dynamic Price Updater
    ZX Optimized Images
    Magic Thumb
    Inventory Report
    Sales Report
    Display Log Files
    Clone a Template
    Mod List


    When editing ANY Layout Settings under the Catalog >> Product Types, options to Edit or Cancel appear correctly when you click on the circled-I Action icon. The option to Edit or Cancel is properly displayed and the Action Icon changes to a right-pointing arrow.


    When attempting to edit any of the page's settings by clicking on the Edit button, I get
    Code:
    [24-Feb-2020 18:06:49 UTC] Request URI: /jetmar/product_types.php?ptID=1&cID=2&action=layout_edit, IP address: 216.177.186.199
    --> PHP Fatal error: Uncaught Error: Call to undefined function cfg_select_drop_down() in /home/********/public_html/******/product_types.php(241) : eval()'d code:1
    Stack trace:
    #0 /home/********/public_html/******/product_types.php(241): eval()
    #1 {main}
    thrown in /home/********/public_html/******/product_types.php(241) : eval()'d code on line 1.

    At first, I thought it might be that the database lists the set_function as ZEN_cfg_select_drop_down() and the error omitted the zen_, but a review of a working site showed that all the database settings matched as well as the YOUR_ADMIN/product_types.php to a site that is functioning correctly.


    Used UltraCompare to evaluate as many admin files as possible. No differences were found that would effect editing product type layout settings. Database files are a match as well.


    Google of PHP Fatal error: Uncaught Error: Call to undefined function cfg_select_drop_down Zen Cart resulted in no cases where the error is discussed in the Forum.


    Must be missing something but need ideas as to where to look.


    THANX
    Did you read the posting tips?!?
    Responsive Color Changes for 155-156c demo here.
    Zen Cart PCI Compatible Hosting

  2. #2
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    947
    Plugin Contributions
    12

    Default Re: Problem Editing Product Layout Settings

    the function is in ADMIN/includes/functions/general.php around line 999 in a clean ZC1.5.6c

    Used in installers as
    Code:
    $db->Execute("INSERT INTO " . TABLE_PRODUCT_TYPE_LAYOUT . "(configuration_title, configuration_key, configuration_value, configuration_description, product_type_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Show Model Number','SHOW_PRODUCT_AUCTION_INFO_MODEL','1','Display Model Number on Product Info false= off true= on', $am_layout_id,1001, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'1\', \'text\'=>\'True\'), array(\'id\'=>\'0\', \'text\'=>\'False\')), ')");
    Called when the field is displayed in the configuration requiring a drop down list..

    I've had problems when that line was not formatted correctly or I missed the NULL on use_function. should be under set_function.. Could be it was inserted into the table incorrectly.
    Dave
    Always forward thinking... MySite..

  3. #3
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    1,556
    Plugin Contributions
    2

    Default Re: Problem Editing Product Layout Settings

    Quote Originally Posted by dbltoe View Post

    When attempting to edit any of the page's settings by clicking on the Edit button, I get
    Code:
    [24-Feb-2020 18:06:49 UTC] Request URI: /jetmar/product_types.php?ptID=1&cID=2&action=layout_edit, IP address: 216.177.186.199
    --> PHP Fatal error: Uncaught Error: Call to undefined function cfg_select_drop_down() in /home/********/public_html/******/product_types.php(241) : eval()'d code:1
    Stack trace:
    #0 /home/********/public_html/******/product_types.php(241): eval()
    #1 {main}
    thrown in /home/********/public_html/******/product_types.php(241) : eval()'d code on line 1.

    At first, I thought it might be that the database lists the set_function as ZEN_cfg_select_drop_down() and the error omitted the zen_, but a review of a working site showed that all the database settings matched as well as the YOUR_ADMIN/product_types.php to a site that is functioning correctly.


    Used UltraCompare to evaluate as many admin files as possible. No differences were found that would effect editing product type layout settings. Database files are a match as well.

    i do not think this should be that hard.

    you are calling a function that does not exist. this function is used in the product type layout table. it should have the zen_ as the prefix as that is the name of the function and defined as davewest says. you can try running the following sql statement:

    Code:
    SELECT *
    FROM `product_type_layout`
    WHERE `set_function` LIKE '%cfg_select_drop_down%' AND `set_function` NOT LIKE '%zen_cfg_select_drop%'
    and see if that results in any rows. if so that is where your problem is.

    if that does not work, you can search your source code using grep (assuming you are on a linux box). from the doc root of your store:

    Code:
    grep -r ' cfg_select_drop_down' *
    hope that gives you a few ideas....
    practice #socialdistancing #staysafe
    email is hard....
    help out with the green....

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    7,455
    Plugin Contributions
    8

    Default Re: Problem Editing Product Layout Settings

    Bingo.

    Compared the 9 but not the 139.

    THANX carlwhat and yes, davewest, it apparently was brought in incorrectly to the database but not where I checked.
    Did you read the posting tips?!?
    Responsive Color Changes for 155-156c demo here.
    Zen Cart PCI Compatible Hosting

 

 

Similar Threads

  1. v156 Editing Breadcrumbs layout problem
    By RixStix in forum Upgrading to 1.5.x
    Replies: 13
    Last Post: 9 Jan 2019, 11:30 PM
  2. Product types - editing layout
    By keyclearste in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 30 Dec 2011, 03:49 PM
  3. Wanting to change product layout settings
    By canemasters in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 23 Nov 2011, 05:49 AM
  4. Editing layout of a category's product list
    By Dunk in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 6 Jan 2009, 12:47 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