Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2010
    Posts
    25
    Plugin Contributions
    0

    Default 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!

  2. #2
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default 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

  3. #3
    Join Date
    Jan 2010
    Posts
    25
    Plugin Contributions
    0

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

  4. #4
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default 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

  5. #5
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default 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

  6. #6
    Join Date
    Jan 2010
    Posts
    25
    Plugin Contributions
    0

    Default 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!

  7. #7
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Admin Fatal Error

    Quote Originally Posted by Shaunus View Post
    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.


    Quote Originally Posted by Shaunus View Post
    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.

  8. #8
    Join Date
    Jan 2010
    Posts
    25
    Plugin Contributions
    0

    Default 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.

  9. #9
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default 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

  10. #10
    Join Date
    Jan 2010
    Posts
    25
    Plugin Contributions
    0

    Default Re: Admin Fatal Error

    OK great. Thanks for the help guys.

 

 

Similar Threads

  1. fatal error on admin page
    By wildfire1629 in forum Basic Configuration
    Replies: 10
    Last Post: 5 Jan 2010, 12:00 PM
  2. Fatal Error on admin
    By kgsid in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 5 Sep 2009, 09:21 PM
  3. Fatal error on admin page
    By Primitivesoaps in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 Jul 2009, 05:14 PM
  4. Getting fatal error in admin
    By Exalt in forum General Questions
    Replies: 1
    Last Post: 28 Jan 2009, 05:37 AM

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