2

I am working in magento 1.9 . I developed new module , when i install it in new instance , it gave Error 404 .

If i Logout, it fix the issue but i want to fix the issue via code . So i try to write a logout code in setup script , but no luck with it . My code looks like

 public function expireAdminSession() {
    // loguot code
     $adminSession = Mage::getSingleton('admin/session');
     $adminSession->unsetAll();
     $adminSession->getCookie()->delete($adminSession->getSessionName());
}

I have called that function in construct. .

Any body please help or tell me any other solution to logout via code . Thank you in advance .

1 Answer 1

3

I think it's default behaviour of Magento after installing any custom module to instance.

You have to follow proper steps in order to avoid this. (In short its not bug It's feature of Magento).

  1. Copy necessary files to server.

  2. Than after completion uploading go to configuration and refresh cache and flush cache.

  3. Logout of admin and re-login to admin panel.

Now, You are ready to go with your custom module.

Note : It's not my personal thinking. You will find above instruction in most of the premium Magento Partner's Module Installation Guide.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.