Fatal error:Class 'Mage_Adminhtml_Controller_action' not found in BookmarksController.php on line 4

Fatal error:Class 'Mage_Adminhtml_Controller_action' not found in BookmarksController.php on line 4

August 4, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Fatal error:Class 'Mage_Adminhtml_Controller_action' not found in BookmarksController.php on line 4

Troubleshooting “Class ‘Mage_Adminhtml_Controller_action’ not found” Error in Magento BookmarksController.php

Introduction

If you’re encountering the Fatal error: Class 'Mage_Adminhtml_Controller_action' not found error in your Magento Social Bookmarking plugin, this guide will help you troubleshoot and resolve the issue. This error typically occurs when there’s a misalignment between the controller class inheritance defined in the code and the actual class available in Magento.

Understanding the Error

The error Fatal error: Class 'Mage_Adminhtml_Controller_action' not found suggests that PHP cannot find the specified class, Mage_Adminhtml_Controller_action, at runtime. This class is supposed to be a parent class for your BookmarksController.

Step-by-Step Solution

1. Verify the Plugin Status

Firstly, ensure that the Social Bookmarking plugin is still enabled and active in your Magento instance. You can check this by navigating to System > Configuration > Magepal > Social Bookmarking and verifying that the module is enabled.

If the plugin is not displayed or is disabled, you may need to re-enable it from System > Configuration > Advanced > Disable Modules Output. Locate the Magepal_SocialBookmarking module, enable it, then clear your Magento cache.

2. Inspect the BookmarksController.php File

Open the app/code/local/Magentix/SocialBookmarking/controllers/Adminhtml/BookmarksController.php file and carefully examine its contents.

In the provided code snippet, you can see that the current class name is indeed Magentix_SocialBookmarking_Adminhtml_BookmarksController. This means that the controller’s namespace is correctly defined as Magentix_SocialBookmarking_Adminhtml.

However, looking at line 4 of your file (assuming it’s a blank line), you can confirm that there’s no syntax error or unexpected content causing the issue.

3. Check for Magento Core File Changes

Ensure that you have not modified any core files in your Magento installation, as this can lead to compatibility issues.

Compare the contents of app/code/core/Mage/Adminhtml/controllers/ActionController.php with the standard Magento version available online here. Check if there are any differences that might affect the inheritance process.

4. Verify the Controller’s Inheritance

The BookmarksController is supposed to extend the Mage_Adminhtml_Controller_action class, which provides basic functionality for admin controllers in Magento.

However, in your code snippet, you’re extending a different class: Mage_Adminhtml_Controller_action. This suggests that there’s no syntax error or missing file causing the issue; instead, it appears to be an outdated or misconfigured controller class inheritance.

5. Resolve the Inheritance Issue

To resolve this issue, you have two options:

Option A: Use the Correct Parent Class

Update your BookmarksController to extend the correct parent class by replacing:

class Magentix_SocialBookmarking_Adminhtml_BookmarksController extends Mage_Adminhtml_Controller_action {

with:

class Magentix_SocialBookmarking_Adminhtml_BookmarksController extends Mage_Adminhtml_Controller_Action {

This ensures that your controller is compatible with the current Magento core.

Option B: Update the Controller to Extend a New Base Class

In recent versions of Magento, the Mage_Adminhtml_Controller_action class has been deprecated and replaced by Mage_Core_Controller_Front_Action.

Update your BookmarksController as follows:

class Magentix_SocialBookmarking_Adminhtml_BookmarksController extends Mage_Core_Controller_Front_Action {

This ensures that your controller is compatible with the latest Magento core.

Conclusion

The Fatal error: Class 'Mage_Adminhtml_Controller_action' not found error typically occurs due to outdated or misconfigured controller inheritance in your custom plugins. To resolve this issue, carefully inspect and update your controllers to ensure they extend the correct base classes compatible with your Magento version.

Remember that modifying core files is generally discouraged, as it can lead to issues when you upgrade your Magento instance. If you find any core file changes causing the problem, consider creating a patch or using a custom theme to apply your modifications without touching the core.

For more information on developing and troubleshooting Magento plugins, check out the official Magento 2 Developer Documentation at Laravel Company.

Cache Extensions Admin Configuration

Our network