Magento Notice: Undefined index: 0

Today I got this mysterious error message after moving a Magento website to a new server.

Magento Notice: Undefined index: 0  in .../htdocs/app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92

Turns out this was due to a faulty import of the database. Apparently there are a few tables where using an id of 0 in the auto_increment column has a particular meaning and is intended. When restoring the MySQL dump through Navicat it replaced id values of 0 in auto_increment columns with new auto-incremented ids instead of 0 which broke Magento.

To fix this I simply dropped the whole database and reimported the dump using the official MySQL command line client (mysql -u username -p db_name < scrip.sql) and everything worked fine.

Netbeans Preparing Commit

If you ever tried to SVN commit a big project using Netbeans (Magento?) you have most likely seen that “Preparing Commit” message doing seemingly absolutely nothing for several minutes. Apparently the commit takes forever because Netbeans is scanning the entire projet to localize any changes done by external applications before committing. This is not really an issue in 99% of my usual work days thus I had to find a way to disable this.

Seems that adding


To he netbeans configuration file will disable the automatic scan during the commit preparation phase. If for whatever reason  you end up changing a file outside Netbeans (external text editor, adding new pictures…) you cam simply go to the “Files” tab and right-click your projet and hit “Refresh Folder” to let it scan everything.

See for information on how to change the netbeans configuration file.