Zen Cart Logo
Forums / General Questions / ERROR in the admin

ERROR in the admin

Locked

Views: 3,969

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
25 Aug 2006, 11:45 AM
#1
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

ERROR in the admin

I am receiving this error when selecting the 'My Store' in the admin:

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:

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

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??

25 Aug 2006, 7:43 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

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.

26 Aug 2006, 4:22 AM
#3
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

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...:bangin:

26 Aug 2006, 4:57 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

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.

28 Jan 2007, 4:44 PM
#5
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

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

28 Jan 2007, 6:23 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

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.

28 Jan 2007, 8:45 PM
#7
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

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:D

10 Jul 2008, 5:44 AM
#8
reuben avatar

reuben

New Zenner

Join Date:
Apr 2005
Location:
Traralgon
Posts:
51
Plugin Contributions:
0

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