Browsing articles in "Magento error"
Jul 13, 2013
kalpesh

Magento system config 404 error

Magento gives 404 error / Forbidden error / Access denied error when you try to open the screen of your newly written config/system XML code because either of 2 reasons.

1.) You have written the code CORRECTLY, but Magento needs to write permissions for that module in session to show it.
– Just logout and login again and you should see your newly developed screen.

2.) You have some error in your ACL role code. Magento needs the ACL role information to allow admin view the admin module.
– Check your ACL code definition again and make sure everything there is correct.

Sample code of ACL to display custom menu item in navigation:

<config>
    <acl>
        <resources>
            <all>
                <title>Allow everything</title>
            </all>
            <admin>
                <children>
                    <mycustommenu translate="title" module="modulename">
                        <title>Custom MENU</title>
                        <sort_order>500</sort_order>
                        <children>
                            <!-- child items go here -->
                            <submenuitem translate="title" module="modulename">
                                <title>Custom SUB MENU</title>
                                <sort_order>10</sort_order>
                            </submenuitem>
                        </children>
                    </mycustommenu>
                </children>
            </admin>
        </resources>
    </acl>
</config>

Continue reading »

May 22, 2013
kalpesh

Magento Recoverable Error Argument 1 passed to Mage_Core_Model_Store::setWebsite() must be an instance of Mage_Core_Model_Website

Magento Recoverable Error: Argument 1 passed to Mage_Core_Model_Store::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in /var/www/xxx/app/code/core/Mage/Core/Model/App.php on line 634 and defined in /var/www/xxx/app/code/core/Mage/Core/Model/Store.php on line 395

When migrating Magento site from old server to new server, this error often occurs and appears in var/log/system.log. It prevents your Magento Admin to load JS and CSS files hence your admin panel becomes skinless.

The solution to get rid of this and load JS and CSS files is to run the following mysql commands in Mysql console or phpMyAdmin.

SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;

What the above mysql commands does is:
– Disables foreign key checks on tables so that you don’t get any foreign key errors while executing immediate update queries.
– Updates store, store_group and website tables with ID = 0, for admin user

Once the above set of queries are executed, don’t forget to clear cache to reflect your changes.

Apr 18, 2013
kalpesh

pdo_mysql extension is not installed

PHP Mysql Error: pdo_mysql extension is not installed.

Magento needs PDO Mysql extension for database connection and related things, so if you don’t have pdo_mysql extension enabled Magento will complain about this and will not proceed further installation. If you are not sure what PDO is, it’s high time for you to look at http://php.net/manual/en/ref.pdo-mysql.php

Coming back to error, to resolve this you will need to edit your php.ini file where it says:
;extension=pdo_mysql.so

Just uncomment the line by removing front semincolon, so it becomes
extension=pdo_mysql.so

Save it and restart the server, the error should go.

If you are on Windows, then that line should read:

extension=php_pdo_mysql.dll

If you don’t find pdo_mysql in php.ini, install php5-mysql by running the command:

sudo apt-get install php5-mysql (on Ubuntu)

sudo yum install php-mysql (on Redhat, Fedora, CentOS)

Apr 18, 2013
kalpesh

Magento client denied by server configuration notice

Magento client denied by server configuration: /var/www/magento/app/etc/local.xml .. This is not the error, but just a message type thing displayed in apache error log and firebug console. Nothing to worry here, it’s just a security check from web server and you should ignore it.

If you don’t like it then you can turn it off by writing few lines of code in app/design/adminhtml/default/default/layout/local.xml

<layout>
    <default>
        <remove name="notification_security" />
        <remove name="notification_survey" />
    </default>
</layout>

Clear cache as usual, and you should get rid of this message.

Feb 20, 2013
kalpesh

Magento: Product Import error – shows HTML code while importing

While importing products (somewhere around 1200 rows) by Magento’s in-built “System > Import/Export > Dataflow – Profiles” I got an error where the Dashboard’s HTML was printed in the output.

magento product import error

The reason for this error is due to something wrong in CSV product data which Magento didn’t understand. Create a temporary CSV file with only few rows (2-4) and check if that works. If it works, that means there is some problem with rest of the data.

For more information check my SO question here: http://stackoverflow.com/questions/14978970/magento-importing-product-error/14980974

Pages:«123»

Welcome to my Blog

Kalpesh MehtaHelping Magento developers in their day-to-day development problems since 2011. Most of the problems and solutions here are my own experiences while working on different projects. Enjoy the blog and don't forget to throw comments and likes/+1's/tweets on posts you like. Thanks for visiting!

Certifications

Honor

Recognition

Magento top 50 contributors

Magento top 50 contributors

Contributions