Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7896621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:56:29+00:00 2026-06-03T07:56:29+00:00

it shows: Fatal error: Class ‘Mage_Adminhtml_Controller_action’ not found in …/app/code/local/Magentix/SocialBookmarking/controllers/Adminhtml/BookmarksController.php on line 4 I

  • 0

it shows:
Fatal error: Class 'Mage_Adminhtml_Controller_action' not found in .../app/code/local/Magentix/SocialBookmarking/controllers/Adminhtml/BookmarksController.php on line 4

I check it and find that nothing is in bookmarkscontroller.php.on line 4. What’s wrong is it?
and I also check it that the social bookmarket plugin still shows in the front page here.

Original code:

<?php

/** http://www.magentix.fr **/

class Magentix_SocialBookmarking_Adminhtml_BookmarksController extends Mage_Adminhtml_Controller_action {

    protected function _initAction() {

        $this->loadLayout()

            ->_setActiveMenu('cms/socialbookmarking')

            ->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));



        return $this;

    }   



    public function indexAction() {

        $this->_initAction()->renderLayout();

    }



    public function editAction() {

        $id     = $this->getRequest()->getParam('id');

        $model  = Mage::getModel('socialbookmarking/bookmarks')->load($id);



        if ($model->getId() || $id == 0) {

            $data = Mage::getSingleton('adminhtml/session')->getFormData(true);

            if (!empty($data)) {

                $model->setData($data);

            }



            Mage::register('socialbookmarking_data', $model);



            $this->loadLayout();

            $this->_setActiveMenu('cms/socialbookmarking');



            $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));

            $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));



            $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);



            $this->_addContent($this->getLayout()->createBlock('socialbookmarking/adminhtml_bookmarks_edit'))

                ->_addLeft($this->getLayout()->createBlock('socialbookmarking/adminhtml_bookmarks_edit_tabs'));



            $this->renderLayout();

        } else {

            Mage::getSingleton('adminhtml/session')->addError(Mage::helper('socialbookmarking')->__('Bookmark does not exist'));

            $this->_redirect('*/*/');

        }

    }



    public function newAction() {

        $this->_forward('edit');

    }



    public function saveAction() {

        if ($data = $this->getRequest()->getPost()) {



            if(isset($_FILES['bookmarkimage']['name']) && $_FILES['bookmarkimage']['name'] != '') {

                try {

                    $uploader = new Varien_File_Uploader('bookmarkimage');



                    $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));

                    $uploader->setAllowRenameFiles(false);



                    $uploader->setFilesDispersion(false);



                    $path = Mage::getBaseDir('media').DS.'social';

                    $uploader->save($path, $_FILES['bookmarkimage']['name']);



                } catch (Exception $e) {



                }



                $data['image'] = 'social/'.$_FILES['bookmarkimage']['name'];

            }



            if(isset($data['bookmarkimage']['delete'])) $data['image'] = '';



            $model = Mage::getModel('socialbookmarking/bookmarks');     

            $model->setData($data)->setId($this->getRequest()->getParam('id'));



            try {

                if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {

                    $model->setCreatedTime(now())->setUpdateTime(now());

                } else {

                    $model->setUpdateTime(now());

                }   



                $model->save();

                Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('socialbookmarking')->__('Bookmark was successfully saved'));

                Mage::getSingleton('adminhtml/session')->setFormData(false);



                if ($this->getRequest()->getParam('back')) {

                    $this->_redirect('*/*/edit', array('id' => $model->getId()));

                    return;

                }

                $this->_redirect('*/*/');

                return;

            } catch (Exception $e) {

                Mage::getSingleton('adminhtml/session')->addError($e->getMessage());

                Mage::getSingleton('adminhtml/session')->setFormData($data);

                $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));

                return;

            }

        }

        Mage::getSingleton('adminhtml/session')->addError(Mage::helper('socialbookmarking')->__('Unable to find bookmark to save'));

        $this->_redirect('*/*/');

    }



    public function deleteAction() {

        if( $this->getRequest()->getParam('id') > 0 ) {

            try {

                $model = Mage::getModel('socialbookmarking/bookmarks');



                $model->setId($this->getRequest()->getParam('id'))->delete();



                Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('socialbookmarking')->__('Bookmark was successfully deleted'));

                $this->_redirect('*/*/');

            } catch (Exception $e) {

                Mage::getSingleton('adminhtml/session')->addError($e->getMessage());

                $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));

            }

        }

        $this->_redirect('*/*/');

    }



    public function massDeleteAction() {

        $socialbookmarkingIds = $this->getRequest()->getParam('socialbookmarking');

        if(!is_array($socialbookmarkingIds)) {

            Mage::getSingleton('adminhtml/session')->addError(Mage::helper('socialbookmarking')->__('Please select bookmark(s)'));

        } else {

            try {

                foreach ($socialbookmarkingIds as $socialbookmarkingId) {

                    $socialbookmarking = Mage::getModel('socialbookmarking/bookmarks')->load($socialbookmarkingId);

                    $socialbookmarking->delete();

                }

                Mage::getSingleton('adminhtml/session')->addSuccess(

                    Mage::helper('adminhtml')->__(

                        'Total of %d record(s) were successfully deleted', count($socialbookmarkingIds)

                    )

                );

            } catch (Exception $e) {

                Mage::getSingleton('adminhtml/session')->addError($e->getMessage());

            }

        }

        $this->_redirect('*/*/index');

    }



    public function massStatusAction() {

        $socialbookmarkingIds = $this->getRequest()->getParam('socialbookmarking');

        if(!is_array($socialbookmarkingIds)) {

            Mage::getSingleton('adminhtml/session')->addError($this->__('Please select bookmark(s)'));

        } else {

            try {

                foreach ($socialbookmarkingIds as $socialbookmarkingId) {

                    $socialbookmarking = Mage::getSingleton('socialbookmarking/bookmarks')

                        ->load($socialbookmarkingId)

                        ->setStatus($this->getRequest()->getParam('status'))

                        ->setIsMassupdate(true)

                        ->save();

                }

                $this->_getSession()->addSuccess(

                    $this->__('Total of %d record(s) were successfully updated', count($socialbookmarkingIds))

                );

            } catch (Exception $e) {

                $this->_getSession()->addError($e->getMessage());

            }

        }

        $this->_redirect('*/*/index');

    }



    protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream') {

        $response = $this->getResponse();

        $response->setHeader('HTTP/1.1 200 OK','');

        $response->setHeader('Pragma', 'public', true);

        $response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);

        $response->setHeader('Content-Disposition', 'attachment; image='.$fileName);

        $response->setHeader('Last-Modified', date('r'));

        $response->setHeader('Accept-Ranges', 'bytes');

        $response->setHeader('Content-Length', strlen($content));

        $response->setHeader('Content-type', $contentType);

        $response->setBody($content);

        $response->sendResponse();

        die;

    }

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:56:30+00:00Added an answer on June 3, 2026 at 7:56 am

    Your extended class name is misspelled – Mage_Adminhtml_Controller_action should be Mage_Adminhtml_Controller_Action.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get the following error: Fatal error: Class 'mysqli' not found in my php
Hi everybody I have a code that give me this error Fatal error: Class
ELMAH shows host, code, type, error, user, date and time by default on its
I am getting a Fatal error: Using $this when not in object context in
The code below shows me (I think) that the for each loop is about
my app shows a map with annotations fetched from core data. Currently I do
I have a custom exception class with a show() method that shows exceptions in
Please review the example code below, I have a class file that is loaded
I have a Model called blog_model. The code for its constructor is below: class
I have the following PHP code in a class extending mysqli. $queryString = 'SELECT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.