tarka
tarka

Reputation: 5597

Magento PHP Fatal error: Class 'XXXXXX' not found in Mage.php on line 516

I really don't know anything about Magento but a friend installed an extension in their magento store that would not uninstall through the admin console. So I went onto the server and manually deleted all the files and folders relating to the extension.

The good news is that the front end of the site is now working again. However when I try to sign into the admin console, the admin dashboard comes up blank. On inspecting the logs I found that the Mage.php file seems to be looking for the extension Helper Data and can't find it. I have found a couple of other posts relating to this exact problem except they are posted by extension developers who are having problems due to not placed the Helper in the correct folder.

I need to know how Mage.php is referencing this file? How do I delete the reference so that Mage.php no longer expects to find this file?

Upvotes: 2

Views: 10085

Answers (2)

sebastianwagner
sebastianwagner

Reputation: 409

Either a layout references a block whose module-name is not declared in some modules config.xml or some block/template references a helper which is not declared too.

<block type="company_modulename/blockname"
       name="company_modulename"
       template="blockname.phtml" />

Take care to have at least an empty Data helper for each module using $this->__('string') implicit helpers for translation.

config.xml:

<global>
    <helpers>
        <company_modulename>
            <class>Company_Modulename_Helper</class>
        </company_modulename>
    </helpers>
    <models>
        <company_modulename>
            <class>Company_Modulename_Model</class>
        </company_modulename>
    </models>
</global>

Upvotes: 0

Alana Storm
Alana Storm

Reputation: 166086

If you were a Magento developer, I'd tell you the most likely cause of this is Magento has cached an admin configuration file from the old module/extension with a module="helpername" attribute, which in turn triggers the instantiation of a helper object, which in turn triggers the above error.

Since you're not a Magento developer, I'd say your best bet is to manually clear the cache by deleting the files in /path/to/magento/var/cache.  This will force a cache rebuild and remove the problem I described. This cache rebuild may cause other fatal problems if other system files have been incorrectly changed, but that's unavoidable at this point.

(all this assumes you've removed any files the extension placed under the app/design folder hierarchy)

Upvotes: 4

Related Questions