Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not flush cache or do some change in backend. #26

Open
kevin25 opened this issue Nov 28, 2012 · 6 comments
Open

Could not flush cache or do some change in backend. #26

kevin25 opened this issue Nov 28, 2012 · 6 comments

Comments

@kevin25
Copy link

kevin25 commented Nov 28, 2012

I got this erro when flushed the cache:

There has been an error processing your request

Mage registry key "_singleton/varnish/observer" already exists

Trace:
#0 /var/www/html/app/Mage.php(192): Mage::throwException('Mage registry k...')
#1 /var/www/html/app/Mage.php(446): Mage::register('_singleton/varn...', false)
#2 /var/www/html/app/code/core/Mage/Core/Model/App.php(1208): Mage::getSingleton('varnish/observe...')
#3 /var/www/html/app/Mage.php(416): Mage_Core_Model_App->dispatchEvent('http_response_s...', Array)
#4 /var/www/html/app/code/core/Mage/Core/Controller/Response/Http.php(74): Mage::dispatchEvent('http_response_s...', Array)
#5 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Front.php(188): Mage_Core_Controller_Response_Http->sendResponse()
#6 /var/www/html/app/code/core/Mage/Core/Model/App.php(304): Mage_Core_Controller_Varien_Front->dispatch()
#7 /var/www/html/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#8 /var/www/html/index.php(80): Mage::run('', 'store')
#9 {main}

Also varnish cache cart and checkout. I am using magento 1.4.

Thanks

@kevin25
Copy link
Author

kevin25 commented Nov 28, 2012

When i tried to uninstall it, it got this

Not enough arguments (no action specified)

@madalinoprea
Copy link
Owner

It looks like the module was not properly installed, is not able to find the class of 'varnish/observer' and tries to store in registry false. Do you see any configs defined by module in admin? (checking if is properly installed)

@kevin25
Copy link
Author

kevin25 commented Nov 28, 2012

I installed it without error, but when i came to flush cache to activate the module, i got that error. And i could uninstall also.

@madalinoprea
Copy link
Owner

It seems that Magento loaded module's config and registered the observer for http_response_send_before. But when it's trying to instantiate an object for varnish/observer uri (defined via the same config) has some problems.

An idea is to add some debugging code or use xdebug to identify the pace where you it goes crazy. Check Mage_Core_Model_Config, I would expect to see $className = 'Magneto_Varnish_Model_Observer' and class_exists failing.

public function getModelInstance($modelClass='', $constructArguments=array())
{
$className = $this->getModelClassName($modelClass);
if (class_exists($className)) {

I assume you're having a single server, the default cache backend (files), nothing uber fancy.

@kevin25
Copy link
Author

kevin25 commented Nov 28, 2012

Here it is
public function getModelInstance($modelClass='', $constructArguments=array())
{
$className = $this->getModelClassName($modelClass);
if (class_exists($className)) {
Varien_Profiler::start('CORE::create_object_of::'.$className);
$obj = new $className($constructArguments);
Varien_Profiler::stop('CORE::create_object_of::'.$className);
return $obj;
} else {
#throw Mage::exception('Mage_Core', Mage::helper('core')->__('Model class does not exist: %s.', $modelClass));
return false;
}
}

@kevin25
Copy link
Author

kevin25 commented Nov 28, 2012

Any idea? This is very urgent. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants