13

When I try to add or edit a product I receive the following error:

Mage registry key "_singleton/weee/observer" already exists
Trace:
#0 app/Mage.php(222): Mage::throwException('Mage registry k...')
#1 app/Mage.php(476): Mage::register('_singleton/weee...', false)
#2 app/code/core/Mage/Core/Model/App.php(1316): Mage::getSingleton('weee/observer')
#3 app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('adminhtml_catal...', Array)
#4 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php(143): Mage::dispatchEvent('adminhtml_catal...', Array)
#5 app/code/core/Mage/Adminhtml/Block/Widget/Form.php(144): Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes->_prepareForm()
#6 app/code/core/Mage/Core/Block/Abstract.php(862): Mage_Adminhtml_Block_Widget_Form->_beforeToHtml()
#7 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php(79): Mage_Core_Block_Abstract->toHtml()
#8 app/code/core/Mage/Core/Block/Abstract.php(238): Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs->_prepareLayout()
#9 app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#10 app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('adminhtml/catal...', 'product_tabs')
#11 app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('adminhtml/catal...', 'product_tabs')
#12 app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#13 app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#14 app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#15 app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#16 app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(Array, true, true)
#17 app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(207): Mage_Adminhtml_Controller_Action->loadLayout(Array)
#18 app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Adminhtml_Catalog_ProductController->newAction()
#19 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('new')
#20 app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#21 app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#22 app/Mage.php(683): Mage_Core_Model_App->run(Array)
#23 index.php(124): Mage::run('catalog', 'website')
#24 {main}

Magento ver. 1.7.0.0 Compiler turned off cleared cache rebuilt index no updates or new extensions have been installed it just quit working

Any help would be appreciated!

  • 1
    From my understanding this is caused by cache, are you sure it's cleared? How did you clear it? – Peter O'Callaghan Jan 8 '15 at 18:17
  • I used Cache Management under System - Flush Magento Cache and Flush Cache Storage. Is there a way to check if the cache has been flushed? – littleredsunshine Jan 8 '15 at 19:16
  • Assuming your using file based cache, check there is something inside the var/cache directory, if there is, delete everything in the folder. – Peter O'Callaghan Jan 8 '15 at 21:40
  • Tried that, still getting errors. At the very top of the screen there is also a reference to Linux sitename 3.8.0-41-generic #60~precise1-Ubuntu SMP Fri May 16 00:18:00 UTC 2014 x86_64 Thank you for your quick answers and your help! – littleredsunshine Jan 8 '15 at 21:46
16

This error arriving due to empty values in registry.

to prevent it, you need to disable 'compilation' mode, and if you want to use it, re run it.

php -f shell/compiler.php disable
php -f shell/compiler.php clear
php -f shell/compiler.php compile
  • Tried clearing and disabling compiler and still getting the error. Any other ideas would be appreciated. – littleredsunshine Jan 9 '15 at 15:49
  • Run Compilation works!!! – MageDev Apr 22 '15 at 10:26
  • Abhishek you are my hero! This post fixed a problem I've spent hours at with similar error to above post. Compiling from admin panel causing error. But running from command line worked fine :) – MagentoMac Sep 17 '15 at 14:04
4

Check if your event observer xml code in your module's config.xml is all correct.

It should be something like this:

<events>
    <event_name_that_you_are_working_on>
        <observers>
            <some_unique_identifier>
                <type>singleton</type>
                <class>YourNamespace_YourModule_Model_Observer</class>
                <method>functionNameInYourObserver</method>
            </some_unique_identifier>
        </observers>
    </event_name_that_you_are_working_on>
</events>

I once got this kind of error because I was using modulename/observer inside class node. Using full class name (YourNamespace_YourModule_Model_Observer) solved the error for me.

In your module's event-observer xml code, you might be using class like below:

<class>yourmodule/observer</class>

Try using this instead (as done in above event-observer xml code):

<class>YourNamespace_YourModule_Model_Observer</class>
1
  1. Disable the extension from app\etc\moduels directory.
  2. Clear cache and
  3. Run Compilation.

Now, it will works fine.

0

First Disable Compilation and cache.

And Clear all cache forcefully.

Then install Extension.

After that Run Compilation process.

Above process worked for me.

0

To disable compilation in Magento, edit includes/config.php. At around line 28, uncomment the first line and comment out the second:

#define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src');
define('COMPILER_COLLECT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'stat');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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