Magento : find out which xml fails

If you've been working with Magento extensions or layout, you might have encountered the frustration of trying to find out which XML generates the following error, potentially harming the whole magento installation :

the problem with this kind of error is that it doesn't tell you which file is causing the error. To find out, work with your local installation

  • set the developer mode in index.php : Mage::setIsDeveloperMode(true);
  • open the app/code/core/Mage/Adminhtml/Model/Config.php and let the _initSectionsAndTabs tell you which xml is being loaded in the modules loop, just after $configFile is defined : echo $configFile;
  • the last file that pops before the error is thrown out is likely to cause the breakout !!

wp super cache and WP3.0 menus

For those who are running small servers and wish to accelerate their worpdress installation, we recommend the installation of eaccelerator but also the wp-super-cache plugin. There is just a small hack for wordpress 3.0 menu users : the cache should be totally refreshed when a menu is modified, and this is performed via the wp_update_nav_menu action, instantiated in the wp-cache-phase2.php / wp_cache_phase2 function

Read more

PHP development framework comparison : symfony, Zend Framework, Code Igniter

Before starting development on a new project, I need to investigate 3 popular PHP development frameworks. I would say if you need to choose, stick to the one you know already. I you don't know a framework already then you're in trouble and you need advice. Here a few things I would look for.

Beyond the code and standarts : what's available

MVC is a nice idea but it's only an idea and even if it's useful to structure the code the power of frameworks are in their community.

  • Look for application samples.
    • Zend framework used to have a good application sample, distributed free as DodoApp. Unfortunately it's not available any more but other applications are out there to get you started if you need code samples, check out our article. In general I have been looking a lot and it's hard to find a starter application for Zend Framework
    • Symfony has a lot of opensource applications, the list is here
    • Code Igniter is simpler to learn apparently but you'll find it hard to find good sample applications .We 've listed two of them in a previous article
  • Look for available code snippets
    • Zend framework code snippets can be found all over the web but you have to know the framework really well to integrate them in your application
    • Code igniter snippets are displayed on the forum but not categorized
    • symfony snippets are organized and tagged in the plugin repository, easily available from Symfony's official web site,  and I have to say that's a real sign of good community work

The conclusion is make your life and your own choice. I was using Zend framework but a few minutes investigation convince me I should look into symfony.