Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default ERROR in the admin

    I am receiving this error when selecting the 'My Store' in the admin:
    Code:
    Warning: call_user_func(get_country_name) [function.call-user-func]:
    First argument is expected to be a valid callback in
    /home/XvarX/public_html/test/admin/includes/functions/general.php on line 1521
    Also when selecting admin > mystore > zone | I am receiving this error:
    Code:
    Fatal error: Call to undefined function: cfg_select_drop_down() in
    /home/XvarX/public_html/test/admin/product_types.php(261) : eval()'d code on line 1
    Search produced: This File > /home/XvarX/public_html/test/admin/includes/functions/general.php and this entry
    Code:
    Line #1016 : function zen_cfg_select_drop_down($select_array,
    $key_value, $key = '') {
    This causes the selections to not display and renders these functions in the admin unuseable.

    I have not a clue??
    Zen-Venom Get Bitten

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: ERROR in the admin

    You have a record in your configuration table whose set_function or use_function is
    cfg_select_drop_down()
    rather than
    zen_cfg_select_drop_down()
    This usually happens when someone manually edits their .sql file to do a global remove of "zen_" prefixes for table names and then importing the file, rather than letting Zen Cart do the prefix removal via the installer.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: ERROR in the admin

    DrByte,

    Yes, this is close to what was going on...I also noticed the mis-match with a clearer head after rest...

    What I did not know, or am theorizing, is that core files i.e. general.php or product_types.php were written to on an install to reflect any DB prefix.

    Or how does this mis-match propogate....always thought that the only 2 files that needed editing were the 2 configure.php files....

    A bit of insight??

    DB backup was clean as when I scrapped the full install(not a load over) and loaded a fresh set of files all was back to normal...
    Zen-Venom Get Bitten

  4. #4
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: ERROR in the admin

    I've seen no cause for this other than mucking with a db backup script doing a find/replace of zen_ with null and then reloading it.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Oct 2005
    Location
    Eastern US
    Posts
    488
    Plugin Contributions
    0

    Default Re: ERROR in the admin

    I am having this same problem. In my case the error shows up in

    catalog->product types->product general->edit layout->error displays when I click on any variable to edit it.

    The exact error reads
    Fatal error: Call to undefined function: cfg_select_drop_down() in /home/natuscom/public_html/greenhouse/product_types.php(248) : eval()'d code on line 1
    I have searched the above noted file, the product_type_layout table and found nothing.

    Developers tool kit showed one other file with cfg_select_drop_down in image handler. That file also has the zen_prefix everywhere.

    I suspect that I do not know the proper way to find the missing prefix in my database.

    I have exported the table in order to do a search of the sql file, all prefixes seem to be in order.

    Anybody have any insight?

    Thanks!
    Audra

  6. #6
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: ERROR in the admin

    Your "configuration" and "product_type_layout" tables have "use_function" and "set_function" columns that use the zen_cfg_xxxxxxx functions.

    The only way to have these busted is to have manually edited a database-import file to remove the zen_ indescriminately.

    To recover, you can either go back to an older SQL file that wasn't edited, and import it to replace all your current settings, or you can manually edit each record in the 2 tables and make sure that the zen_cfg_xxxxxx function names are properly intact for the 2 columns I mentioned.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Oct 2005
    Location
    Eastern US
    Posts
    488
    Plugin Contributions
    0

    Default Re: ERROR in the admin

    Thanks Dr Byte,
    I did edit an import file to remove the zen_ prefix on the tables. I went through each instance so as only to change the table names, but I must have erred. I just can't seem to find the mistake.

    Anyway, for the next person looking for answers to this same problem...
    After looking for my mistake unsuccessfully, I finally just dropped my product_type_layout table, exported it again from my old database, again carefully editted out my table prefixes and imported in into my new database. Errors gone.

    (I pretty much figured this table was the culprit because I had only imported select tables.)

    I guess I will need to upgrade my database again, although I'm not real sure about that. Pretty sure it won't harm anything to do it anyway, so long as I backup my database first!

    Thanks Doc,
    Audra, who is getting ever so much closer to having a fully functioning cart in the current version, oh happy day

  8. #8
    Join Date
    Apr 2005
    Location
    Traralgon
    Posts
    56
    Plugin Contributions
    0

    Default Re: ERROR in the admin

    Thanks Dr Byte

    I also had this problem and resolved it after reading your post, by searching for cfg_select_drop_down and then replacing it with zen_cfg_select_drop_down using phpMyAdmin.

    Cheers

    Reuben

 

 

Similar Threads

  1. Error bringing up the admin page
    By ChrisW97 in forum General Questions
    Replies: 2
    Last Post: 22 Apr 2010, 02:34 PM
  2. Replies: 0
    Last Post: 27 Jul 2009, 12:22 PM
  3. error/cannot access The Admin Console 500 internal server error
    By psarapas in forum Installing on a Mac Server
    Replies: 4
    Last Post: 12 Mar 2008, 11:45 PM

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