Forums / Basic Configuration / Admin Fatal Error

Admin Fatal Error

Locked

Started by shaunus on 9 Jan 2010, 9:18 PM · Views: 1,060

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
9 Jan 2010, 9:18 PM
#1
shaunus avatar

shaunus

New Zenner

Join Date:
Jan 2010
Posts:
25
Plugin Contributions:
0

Admin Fatal Error

Hi people,

Seem to be having problem after problem...

After altering the title of a sidebox in the english.php file, I kept getting a fatal error when entering admin. Initially relating to a missing header.php file.

I then copied this file into my admin folder, and I can now get into admin, however all the page formatting has disappeared, the font is Times new Roman and no functions/menus work.

There is an error shown at the bottom of the page as follows:

Fatal error: Call to a member function get_template_dir() on a non-object in /home/techhahr/public_html/admin/includes/languages/english/credit_cards.php on line 46

Can anyone help me please? I have no idea how to fix this error, and I'm getting worried because I can't carry out any managment on my shop!

9 Jan 2010, 10:07 PM
#2
absolute avatar

absolute

Totally Zenned

Join Date:
May 2005
Location:
Bath, Somerset
Posts:
1,054
Plugin Contributions:
2

Re: Admin Fatal Error

Sounds like a major file is missing from your site. Do you have a backup of your admin? What type of server are you on and how much access do you have?

If you have cPanel, the first thing tocheck the FTP access log. This will show you all the files you have changed today.

I would start with taking a look at application_top.php within admin/includes/, and make sure that it matches a standard Zen application_top.php file. It sounds like you may have a store side application_top file in there rather than a admin side. Only a guess, but worth a look.

Which header.php file was it that it wanted you to add?

Absolute

Back, after a 4 year absence! Did you miss me?
Absolute Web Solutions Ltd
Interested in our work? Take a look at one of our sites - The Tech Store

10 Jan 2010, 10:14 AM
#3
shaunus avatar

shaunus

New Zenner

Join Date:
Jan 2010
Posts:
25
Plugin Contributions:
0

Re: Admin Fatal Error

Thanks for your reply. I have cpanel.

I think the whole thing has got completely messed up. The access logs just show 'No records found'.

I think I'll have to reload Zencart again or something. I've been a bit to ambitious in trying to customise things, without fully knowing what I'm doing.

It all started when I edited the english.php file, I've found that file in the following locations:

admin/english.php
admin/includes/languages/english.php
includes/languages/english.php
includes/languages/english/english.php
includes/languages/english/custom temp/english.php

The file contains the same text in each location. Should this file be in all these locations, and should the admin version be different to the storeside version?

10 Jan 2010, 2:41 PM
#4
absolute avatar

absolute

Totally Zenned

Join Date:
May 2005
Location:
Bath, Somerset
Posts:
1,054
Plugin Contributions:
2

Re: Admin Fatal Error

admin/english.php isn't a standard file.

admin/includes/languages/english.php should be an ADMIN language file - check a standard Zen set of files to make sure you have the right version.

includes/languages/english.php - this is in the right place, but check with a standard Zen to make sure this file is correct

The other two files you have listed are not required, as they are in the wrong location.

Is your template folder "custom temp"? If so, try not to use folder names with spaces. This may cause you more problems further down the line with includes and java files etc.

If you template folder is "custom", then there should be a copy of includes/languages/english.php in includes/languages/custom/english.php. You can then alter this file, which will over-ride the original file.

Absolute

Back, after a 4 year absence! Did you miss me?
Absolute Web Solutions Ltd
Interested in our work? Take a look at one of our sites - The Tech Store

10 Jan 2010, 2:44 PM
#5
absolute avatar

absolute

Totally Zenned

Join Date:
May 2005
Location:
Bath, Somerset
Posts:
1,054
Plugin Contributions:
2

Re: Admin Fatal Error

Why am I answering two threads for you on exactly the same problem? This is just wasting my time.

See the other thread - http://www.zen-cart.com/forum/showthread.php?t=145370

PLEASE - if you have a problem, just post once. If you don't get an answer immediately, then PLEASE just wait for members to respond. There are thousands of answers already in this forum, so sometimes maybe a little search will show you that others have had the same problem in the past.

Absolute

Back, after a 4 year absence! Did you miss me?
Absolute Web Solutions Ltd
Interested in our work? Take a look at one of our sites - The Tech Store

12 Jan 2010, 12:58 PM
#6
shaunus avatar

shaunus

New Zenner

Join Date:
Jan 2010
Posts:
25
Plugin Contributions:
0

Re: Admin Fatal Error

Yes, apologies for the cross-over in my threads. I was very confused as to what the problem might be at first, but then I homed in on the english.php being the problem.

In the end I just removed zencart entirely, and reinstalled. That way I knew all the files would be in the right place.

One thing that still puzzles me is the location of an english.php file for my custom template. I don't have a directory called includes/languages/CUSTOM/

I am altering the inlcudes/languages/english.php file and this is altering my custom template as I want it to. Do I need to create a directory called 'CUSTOM' put an english.php in there and start altering that, so that future upgrades etc don't get overwritten?

Thanks for your help!

12 Jan 2010, 1:25 PM
#7
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Admin Fatal Error

Shaunus:

One thing that still puzzles me is the location of an english.php file for my custom template. I don't have a directory called includes/languages/CUSTOM/
CUSTOM is meant to represent the actual name of your Template.

Shaunus:

I am altering the inlcudes/languages/english.php file and this is altering my custom template as I want it to. Do I need to create a directory called 'CUSTOM' put an english.php in there and start altering that, so that future upgrades etc don't get overwritten?
You need to create this dir:
includes/languages/CUSTOM
Then copy the "english.php" file into it.

Although your edits are working they will be overwritten if you update.

The learning is in the doing.

Potent Products

13 Jan 2010, 12:42 PM
#8
shaunus avatar

shaunus

New Zenner

Join Date:
Jan 2010
Posts:
25
Plugin Contributions:
0

Re: Admin Fatal Error

Yeah, I knew that CUSTOM should actually be named as my own template, I just wasn't sure if I had to create that folder, or if I'd done something wrong becasue it wasn't there.

Do all other customisable files go in there too?

Thanks for your help.

13 Jan 2010, 2:50 PM
#9
absolute avatar

absolute

Totally Zenned

Join Date:
May 2005
Location:
Bath, Somerset
Posts:
1,054
Plugin Contributions:
2

Re: Admin Fatal Error

All other custom PAGE language files go in includes/languages/english/CUSTOM/

Absolute

Back, after a 4 year absence! Did you miss me?
Absolute Web Solutions Ltd
Interested in our work? Take a look at one of our sites - The Tech Store

13 Jan 2010, 7:46 PM
#10
shaunus avatar

shaunus

New Zenner

Join Date:
Jan 2010
Posts:
25
Plugin Contributions:
0

Re: Admin Fatal Error

OK great. Thanks for the help guys.