1

I have a Magento development environment setup on a virtual box server with a git repo in the root web directory. I've been using this setup for almost a year. Yesterday I checked out master and now if I go to the home page I get a blank white page (view source shows nothing is returned). No errors are in var/log or var/report. I've cleared var/cache and verified my permissions pare properly set. The same branch is checked out on our live site and QA, and both work just fine.

If I go to a product page, the bulk of the page is there, but lots of CSS and JS is missing. I have found that it's trying to load http://example.com/mage/translate.js instead of http://example.com/js/mage/translate.js. So it appears that the config value for the js folder isn't being loaded.

If I go to the admin the login page loads the inputs and dies with this error

Warning: include(Mage/Captcha/Model.php): failed to open stream: No such file or directory

This is caused by these lines

$type = $this->getConfigNode('type');
$this->_captcha[$formId] = Mage::getModel('captcha/' . $type, array('formId' => $formId));

in Mage_Captcha_Helper_Data (lines 71 & 72). The issue is that $type is coming back as null when it should get the default from the Captcha config.xml. I've checked that the config file is there and its loaded by Varien_Simplexml_Config::loadFile().

Can anyone offer any suggestions as to what I may have done to my server to mess it up this badly?

1

It turns out that it was my own fault the whole time.

Before the blank white page started occurring, I was working on updating a config value in an install script using Mage::getModel('core/config')->saveConfig($path, $value) I accidentally ran that line of code once with $path = ''. This saved a row in core_config_data with a blank path. When I finally noticed that row I deleted it from the database and everything is running fine now.

I haven't found the code to verify this, but I assume what happens is after all the config.xml files are read, Magento pulls down all the rows in core_config_data and tries to insert each row's value in the corresponding path of the xml. When it got to the blank path it removed all the nodes beneath config/default and caused everything to fail.

Hope this helps someone in the future.

  • If you're curious about the configuration loading process, I wrote a four part articles series on it a few years back: alanstorm.com/category/magento#magento_config – Alan Storm Aug 7 '14 at 5:26
  • I read all of part 1 in my search for the answer to this bug. But only skimmed part 2 and stopped there. I guess I should have kept on reading. Part 3 explains exactly what I assumed! Thanks for the info. – Jason Neumann Aug 7 '14 at 14:53

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.