Question

Every so often we keep getting the error:-

PHP Fatal error: Class 'Mage_Adminnotification_Helper_Data' not found in /var/www/vhosts/domain.co.uk/httpdocs/app/Mage.php on line 546

This causes the backend to produce a 500 Internal Server Error and the above error gets logged each time you try to access a URL in the backend.

Upon inspection though, everything in app/code/core/Mage/AdminNotification is present and completely intact.

To fix the issue, I grab another copy of the above path from a working store and overwrite this one. Clear cache and then fixed, can access backend again.

I've run a compare between the AdminNotification folder and all it's contents for the version that we replaced with and the version that was replaced. Every single thing in both folders are identical. Yet replacing with what was already there fixed the problem. Odd.

Is it possible that a 3rd party extension that serves inbox notifications in the backend could be the cause of this somehow? Maybe trying to extend this class incorrectly or something along those lines? Your advice/suggestions is greatly appreciated.

Was it helpful?

Solution

From what I see in the error message there is a problem. The class in your error message is Mage_Adminnotification_Helper_Data and the class should be named Mage_AdminNotification_Helper_Data. Notice the uppercase N that is lowercase in the error message. There is a change you are correct in your assumption. It could be a 3rd party extension that tries to override Mage_Adminnotification_Helper_Data.

But if you say that overwriting the files in the AdminNotification folder solved the issue there is a chance that someone modified the core files previously.

Additional info
Even if the class names are not case sensitive in PHP the file names are (at least on UNIX operating systems) and the autoloader looks for the class in Mage/Adminnotification/Helper/Data.

OTHER TIPS

Please note the big "N" in AdminNotification. Magento is looking for Admin*n*otification, while only Admin*N*otification is present.

This is probably because the module Mage_AdminNotification is disabled, but there is still a reference to it, probably by some translation functionality in another module. Please make a fulltext search for "adminnotification" in your magento installation (app/core should probably be enough) and skip the module Mage_AdminNotification. You will then know which module is causing the call to Mage_Adminnotification_Helper_Data.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top