Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2018
    Posts
    146
    Plugin Contributions
    0

    Default Additional Images error

    I cant edit show additional images in product types, the edit button doesn't work when i click it. I checked my logs file and this is what i got:

    "PHP Fatal error: Call to undefined function cfg_select_drop_down() in /home/*******/public_html/****/product_types.php(252) : eval()'d code on line 1"

    Line 1-16 is:

    "<?php
    /**
    * @package admin
    * @copyright Copyright 2003-2016 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: Author: DrByte Sun Oct 18 02:03:48 2015 -0400 Modified in v1.5.5 $
    */

    require('includes/application_top.php');

    $action = (isset($_GET['action']) ? $_GET['action'] : '');

    if (zen_not_null($action)) {
    switch ($action) {
    case 'layout_save':
    "

    Any idea how to fix this? Thanks.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Additional Images error

    Where did that " at the beginning of line 1 come from?
    "<?php

    The line that "is the problem" is line 252. But even so, wasn't there a similar problem experienced with the configuration options? Somehow the 'zen_' was removed from the set_function field for some option or another.

    Looks like the issue identified in this thread: https://www.zen-cart.com/showthread...._select_option was not fully addressed...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jan 2018
    Posts
    146
    Plugin Contributions
    0

    Default Re: Additional Images error

    Only goes up to 62 lines..

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

    Default Re: Additional Images error

    Quote Originally Posted by JakeLawless View Post
    Only goes up to 62 lines..
    The error message first points to an issue in admin/product_types.php

    A default version of that (in ZC 1.5.5) has 448 lines: https://github.com/zencart/zencart/b...duct_types.php

    Perhaps you could do yourself a favor and address the posting tips. As to fixing the issue, if I remember correctly enough specific direction was provided in the previously linked thread to address this issue as well (rather to have prevented this issue from occurring). I could be wrong on that part. Wouldn't be the first time, won't be the last.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jan 2018
    Posts
    146
    Plugin Contributions
    0

    Default Re: Additional Images error

    Nevermind, it was me being stupid and looking at wrong file'

    Line 252 - line 255 is:

    if ($cInfo->set_function) {
    eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value, ENT_COMPAT, CHARSET, TRUE) . '");');
    } else {
    $value_field = zen_draw_input_field('configuration_value', htmlspecialchars($cInfo->configuration_value, ENT_COMPAT, CHARSET, TRUE), 'size="60"');
    }


    Any idea what the problem could be?

    Thanks.

  6. #6
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Additional Images error

    Quote Originally Posted by JakeLawless View Post
    Nevermind, it was me being stupid and looking at wrong file'

    Line 252 - line 255 is:

    if ($cInfo->set_function) {
    eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value, ENT_COMPAT, CHARSET, TRUE) . '");');
    } else {
    $value_field = zen_draw_input_field('configuration_value', htmlspecialchars($cInfo->configuration_value, ENT_COMPAT, CHARSET, TRUE), 'size="60"');
    }


    Any idea what the problem could be?

    Thanks.
    The fact that somehow (was never identified how) the set_function for multiple entries was modified to remove zen_ from the associated field. Looking over the history of the three previous posts on this issue, it looks like this post would correct your issue (again?) seeing as there are still remnants of the problem.

    Presumably that sql was never executed, so the first query should work fine, but if it had been executed you make get an error. If an error occurs, either change the new table name, or drop the table and then execute the create table query provided.

    The queries are written to support use within the install sql patches section of the admin's tools.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. v150 Help with debugging error (additional images)
    By CharBee in forum All Other Contributions/Addons
    Replies: 11
    Last Post: 8 Mar 2013, 02:41 AM
  2. Additional Images Module - Admin Area Error
    By PetleyJ in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 24 Apr 2012, 11:43 AM
  3. Layout of Additional of Additional Product Images - Possible Bug?
    By RatMonkey in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 25 Mar 2011, 02:21 PM
  4. Error in product info display additional images
    By ilmarchez in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 17 Dec 2010, 12:49 AM
  5. JS Error in additional images with Lightbox and ImageHandler2
    By possum in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 3 Nov 2007, 05:56 AM

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