Skip to content

Instantly share code, notes, and snippets.

@convenient
Created November 22, 2015 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save convenient/2a30572d6d4bcae9796c to your computer and use it in GitHub Desktop.
Save convenient/2a30572d6d4bcae9796c to your computer and use it in GitHub Desktop.
100 router match iterations

These changes would allow you to ensure that useCache = false for the loadModules, loadDb, and saveCache calls.

Now, I have no idea how useCache = true could possible be set this early in the request flow as the only thing I can see that sets it is a successful call to Mage_Core_Model_Config::loadModulesCache, which if you look at your stack trace is obviously returning false :/

https://github.com/convenient/magento-ce-ee-config-corruption-bug My 100 router fix as discussed in this write the above is all based around the fact that generating the config with useCache = true is a real killer. So, I'd pop this into your Magento instance to make absolutely sure that useCache = false for this bit of code.

protected function _initModules()
{
if (!$this->_config->loadModulesCache()) {
// Hacks start here!
$this->_config->setUseCache(false);
// Hacks end here!
$this->_config->loadModules();
if ($this->_config->isLocalConfigLoaded() && !$this->_shouldSkipProcessModulesUpdates()) {
Varien_Profiler::start('mage::app::init::apply_db_schema_updates');
Mage_Core_Model_Resource_Setup::applyAllUpdates();
Varien_Profiler::stop('mage::app::init::apply_db_schema_updates');
}
$this->_config->loadDb();
$this->_config->saveCache();
}
return $this;
}
public function setUseCache($bool)
{
$this->_useCache = (bool) $bool;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment