Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,145
    Plugin Contributions
    11

    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

  2. #2
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    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... Lost my mind!

  3. #3
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,688
    Plugin Contributions
    9

    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....
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,145
    Plugin Contributions
    11

    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.

  5. #5
    Join Date
    Sep 2020
    Location
    Arizona
    Posts
    29
    Plugin Contributions
    0

    Default Re: Problem Editing Product Layout Settings

    I just did this and still no joy.
    I cannot turn the flag on show free shipping.
    Name:  product_free_shipping_image3.jpg
Views: 91
Size:  19.2 KB

  6. #6
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,688
    Plugin Contributions
    9

    Default Re: Problem Editing Product Layout Settings

    Quote Originally Posted by 4tinak View Post
    I just did this and still no joy.
    I cannot turn the flag on show free shipping.
    Name:  product_free_shipping_image3.jpg
Views: 91
Size:  19.2 KB
    there should be log files. find the log files. search the docs for white page.

    post the contents of the log files. then more help forth coming.

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  7. #7
    Join Date
    Sep 2020
    Location
    Arizona
    Posts
    29
    Plugin Contributions
    0

    Default Re: Problem Editing Product Layout Settings

    Quote Originally Posted by carlwhat View Post
    there should be log files. find the log files. search the docs for white page.

    post the contents of the log files. then more help forth coming.

    best.
    Thank you.
    Here's the error log - admin path omitted.....

    [16-Mar-2021 00:01:06 America/Chicago] PHP Fatal error: Uncaught Error: Call to undefined function cfg_select_drop_down() in /home3/site_name/public_html/v157/Admin/product_types.php(228) : eval()'d code:1
    Stack trace:
    #0 /home3/site_name/public_html/v157/Admin/product_types.php(228): eval()
    #1 /home3/site_name/public_html/v157/Admin/index.php(11): require('/home3/site_name...')
    #2 {main}
    thrown in /home3/site_name/public_html/v157/Admin/product_types.php(228) : eval()'d code on line 1

    [16-Mar-2021 00:01:06 America/Chicago] Request URI: /v157/Admin/index.php?cmd=product_types&ptID=1&cID=15&action=layout_edit, IP address: 70.174.194.79
    --> PHP Fatal error: Uncaught Error: Call to undefined function cfg_select_drop_down() in /home3/site_name/public_html/v157/Admin/product_types.php(228) : eval()'d code:1
    Stack trace:
    #0 /home3/site_name/public_html/v157/Admin/product_types.php(228): eval()
    #1 /home3/site_name/public_html/v157/Admin/index.php(11): require('/home3/site_name...')
    #2 {main}
    thrown in /home3/site_name/public_html/v157/Admin/product_types.php(228) : eval()'d code on line 1.

  8. #8
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,688
    Plugin Contributions
    9

    Default Re: Problem Editing Product Layout Settings

    Quote Originally Posted by 4tinak View Post
    Thank you.
    Here's the error log - admin path omitted.....

    [16-Mar-2021 00:01:06 America/Chicago] PHP Fatal error: Uncaught Error: Call to undefined function cfg_select_drop_down() in /home3/site_name/public_html/v157/Admin/product_types.php(228) : eval()'d code:1
    Stack trace:
    #0 /home3/site_name/public_html/v157/Admin/product_types.php(228): eval()
    #1 /home3/site_name/public_html/v157/Admin/index.php(11): require('/home3/site_name...')
    #2 {main}
    thrown in /home3/site_name/public_html/v157/Admin/product_types.php(228) : eval()'d code on line 1

    [16-Mar-2021 00:01:06 America/Chicago] Request URI: /v157/Admin/index.php?cmd=product_types&ptID=1&cID=15&action=layout_edit, IP address: 70.174.194.79
    --> PHP Fatal error: Uncaught Error: Call to undefined function cfg_select_drop_down() in /home3/site_name/public_html/v157/Admin/product_types.php(228) : eval()'d code:1
    Stack trace:
    #0 /home3/site_name/public_html/v157/Admin/product_types.php(228): eval()
    #1 /home3/site_name/public_html/v157/Admin/index.php(11): require('/home3/site_name...')
    #2 {main}
    thrown in /home3/site_name/public_html/v157/Admin/product_types.php(228) : eval()'d code on line 1.
    are you using v157?

    it "looks" to me like you have a problem in your database. there is NO function called cfg_select_drop_down(). there is a function called zen_cfg_select_drop_down(). its in this file here:

    https://github.com/zencart/zencart/b...ns/general.php

    does your file look like that one?

    more likely, its a problem in the database. can you run sql commands? most people use phpMyAdmin to access the database, although there are many other tools. what is the output of this command:

    Code:
    SELECT *
    FROM `configuration`
    WHERE `set_function` LIKE '%cfg_select_drop_down%' AND `set_function` NOT LIKE 'zen_%'
    you will need to add your zen table prefix to configuration if you are using one. that value is in one of your configure.php files (assuming you utilize a prefix).

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  9. #9
    Join Date
    Sep 2020
    Location
    Arizona
    Posts
    29
    Plugin Contributions
    0

    Default Re: Problem Editing Product Layout Settings

    Site is using 157b.
    Changing the file noted above has no impact.
    I ran the sql and still no improvement.

    What do I need to look at in the database tables?

  10. #10
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,688
    Plugin Contributions
    9

    Default Re: Problem Editing Product Layout Settings

    i'm curious about the results from the sql statement. running it will product a result set. do you get 0 rows?

    what happens if you go to admin -> configuration ->product types
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

 

 
Page 1 of 3 123 LastLast

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