Awnist

Category: Magento

Overriding Magento’s form error mechanisms

Magento’s form error classes are pretty ugly and poorly designed. Luckily, it’s easy to override the methods located in prototype/validation.js. Let’s allow validation on hidden form elements and start working on better looking advice when errors occur. Object.extend(Validation, { isVisible : function(elm) { return true; }, insertAdvice : function(elm, advice){ // advice contains the div [...]

Magento – APC causes downloader error: Cannot redeclare class pear in /usr/share/php/PEAR/Registry.php

If Magento’s downloader is showing Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error. andĀ Apache is throwing [apc-error] Cannot redeclare class pear in /usr/share/php/PEAR/Registry.php on line 22. make sure this is enabled in your /etc/php5/apache2/apc.ini file: apc.include_once_override = 1 if that doesn’t work, you can disable APC in the downloader/ directory by putting php_flag apc.cache_by_default Off inside (magento root)/downloader/.htaccess. [...]