Pretty stumped.

I just took over a buggy and heavily modified Magento 1.7 site whose previous developer disappeared. At one point I flushed all the caches through the backend - afterwards the Newsletter template and queue preview showed the dreaded white screen of death. When I went to edit a Newsletter template I can see the WYSIWYG output, but as soon as it tried to generate a preview - WSOD.

There are currently three copies of the site.

  1. domain.com (live site)
  2. dev.domain.com (dev site setup by a previous developer)
  3. (my localhost copy of the live site (running WAMP) )

After researching, a few sites said to deactivate the compiler. I started with the dev.domain.com site, ran the compiler which created many white screens throughout the site, then disabled it. After that the Newsletter preview worked - awesome. What's confusing is that I don't know why running the compiler and disabling should have done anything...

I tried to duplicate this on the live site. At some point a developer deleted the includes folder. Being cautious I then started playing with the local version.

I copied the includes folder from the dev site to localhost, commenting out the two lines (otherwise got a long list of errors) and renaming the src folder, then enabled it and ran the compiler, then disabled it. Same white screen of death.

I tried flushing all the cache. WSOD. Then reindexing. Same white screen of death.

I tried copying & pasting the raw Newsletter template code into a new Newsletter template on the dev.domain.com site to see if there was an issue with the template - it worked so the template is fine.

I have debugging on - shows nothing.

It seems like the problem was with that initial cache flush - what else could I try?

Thank you!


After some log digging it looks like someone wrote a custom module to add product selections - something in there is throwing an error. The paradox is that it's not throwing an error on dev.domain.com and the code is identical, which again leads me to believe it has something to do with the cache flushing. I tried removing the module manually and reinstalling it, didn't seem to do anything. There isn't an entry in the core_resource though there is one in the core_config_data - though I can't figure out what that does.

Any other ideas I could try? Or should this be posted to stackoverflow instead (I wasn't sure which area it should have been posted)?


Here's the exception.log output:


2014-04-08T23:42:55+00:00 ERR (3): 
exception 'Exception' with message 'File 'C:\wamp\www\domain\media\catalog\product\c\4\c4randomimage.jpg' does not exists.' in C:\wamp\www\domain\lib\Varien\Image.php:67

Strange that it's trying to pull up a cached image, though the cache has been cleared many times.


2014-04-08T23:01:40+00:00 ERR (3): 
exception 'Exception' with message 'File '/home/domainuser/public_html/media/catalog/product/no_selection' does not exists.' in /home/domainuser/public_html/lib/Varien/Image.php:67

Stack trace (essentially the same for both except for paths):

#0 /home/domainuser/public_html/lib/Varien/Image.php(52): Varien_Image->open()
#1 /home/domainuser/public_html/app/code/local/Domain/Customnewsletter/Helper/Data.php(25): Varien_Image->__construct('/home/domainuser/...')
#2 /home/domainuser/public_html/app/design/frontend/meigeetheme/default/template/domain/newweek.phtml(7): Domain_Customnewsletter_Helper_Data->getNewsleterImages(Object(Junaidbhura_Jbmarketplace_Model_Product), 176, 176)
#3 /home/domainuser/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/domainuser/...')
#4 /home/domainuser/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/meigee...')
#5 /home/domainuser/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#6 /home/domainuser/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#7 /home/domainuser/public_html/app/code/core/Mage/Core/Model/Email/Template/Filter.php(191): Mage_Core_Block_Abstract->toHtml()
#8 [internal function]: Mage_Core_Model_Email_Template_Filter->blockDirective(Array)
#9 /home/domainuser/public_html/lib/Varien/Filter/Template.php(134): call_user_func(Array, Array)
#10 /home/domainuser/public_html/app/code/core/Mage/Core/Model/Email/Template/Filter.php(502): Varien_Filter_Template->filter('<table style="w...')
#11 /home/domainuser/public_html/app/code/core/Mage/Newsletter/Model/Template.php(219): Mage_Core_Model_Email_Template_Filter->filter('<table style="w...')
#12 /home/domainuser/public_html/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview.php(64): Mage_Newsletter_Model_Template->getProcessedTemplate(Array, true)
#13 /home/domainuser/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Adminhtml_Block_Newsletter_Template_Preview->_toHtml()
#14 /home/domainuser/public_html/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#15 /home/domainuser/public_html/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#16 /home/domainuser/public_html/app/design/adminhtml/default/default/template/newsletter/template/preview.phtml(34): Mage_Core_Block_Abstract->getChildHtml('content')
#17 /home/domainuser/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/domainuser/...')
#18 /home/domainuser/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#19 /home/domainuser/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#20 /home/domainuser/public_html/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#21 /home/domainuser/public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#22 /home/domainuser/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#23 /home/domainuser/public_html/app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php(146): Mage_Core_Controller_Varien_Action->renderLayout()
#24 /home/domainuser/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Adminhtml_Newsletter_TemplateController->dropAction()
#25 /home/domainuser/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('drop')
#26 /home/domainuser/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#27 /home/domainuser/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#28 /home/domainuser/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#29 /home/domainuser/public_html/index.php(88): Mage::run('', 'store')
#30 {main}

Also strange - now on the live site (which I haven't touched) the preview brings up the admin dashboard. On localhost WSOD on all previews.

  • If only there was a book, like on a ship, a sort of "Captain's Log" that would list out all the PHP errors or Magento exceptions that happen (which is a fancy way of saying check your error logs. Yes, the error is logged. If it's not fix your error reporting level. No, you didn't fix it if the error isn't showing up. Really. ) Apr 12, 2014 at 5:52
  • Point! Added exception.log outputs (nothing in the system.log). By the way - I found your site looking for solutions, the live preview of Commerce Bug 2 is a dead link (wanted to play with it to see if it would help).
    – Gisto
    Apr 12, 2014 at 15:14

2 Answers 2


This has nothing to do with the compiler. Taking a look at your call stack from the error logs.

#0 /home/domainuser/public_html/lib/Varien/Image.php(52): Varien_Image->open()
#1 /home/domainuser/public_html/app/code/local/Domain/Customnewsletter/Helper/Data.php(25): Varien_Image->__construct('/home/domainuser/...')
#2 /home/domainuser/public_html/app/design/frontend/meigeetheme/default/template/domain/newweek.phtml(7): Domain_Customnewsletter_Helper_Data->getNewsleterImages(Object(Junaidbhura_Jbmarketplace_Model_Product), 176, 176)

You've got a custom template in there


This is not part of the standard Magento distribution. It's there either because an extension installed it, or a developer working on your site added it. This template instantiates (indirectly) the Varien_Image with an incorrect path. I say indirectly because in this template there's a call to


That's trying to grab your image. This, in turn (eventually), leads to a method call in line 25 of


which instantiates a Varien_Image object witha file that doesn't exist. Figure out why this custom helper class is create a path to a non-existant image, and you'll find the solution to your problem.

Also, possibly related, it looks like you have a product object rewrite (Junaidbhura_Jbmarketplace_Model_Product) from the Junaidbhura_Jbmarketplace module that may be causing a problem.

  • This was huge - a million thanks! The products selected had some with broken image links - it worked after all products were reset, a new newsletter was queued, and new products were added. I added a quick error check in Data.php to make sure if the file doesn't exist it would pull the placeholder image instead of dying.
    – Gisto
    Apr 13, 2014 at 17:02

The compiler's main purpose is to condense all of Magento's classes into a single directory /includes. This allows Magento to be more efficient in finding the files associated with the classes called within it's MVC structure (because it doesn't have to search through multiple folders to find the classes).

The reason why you experienced the WSOD before you ran the compiler is most likely due to an extension being installed while the compiler is enabled. If you do this and don't run the compiler process, Magento cannot find the classes associated with that extension (because it's looking in the includes directory). After running the compiler, Magento will copy the new extensions class files to the includes directory to be used.

If you're debugging issues like what you've described, I would recommend disabling the compiler entirely so you can narrow down the problem extension/files in Magento.

If you're attempting to fix a "heavily modified" Magento core, my best recommendation would be to start with a fresh Magento base (download from the Magento site, then copy the following directories over from the old site to the new install:

app/design/frontend/[COPY ONLY CUSTOM FOLDERS]
skin/design/frontend/[COPY ONLY CUSTOM FOLDERS]

Obviously this will take some time. You could eliminate the need of manually searching through each folder for modified Magento files by using something like GIT. To do this:

  1. Create an empty folder and copy a fresh install of Magento into it.
  2. Initialize the GIT repo on the directory using git init
  3. Add all the files to GIT using git add .
  4. Commit using: git commit -am 'unmodified Magento
  5. Copy and replace your old broken Magento into the git repo folder.
  6. Get a list of added and modified files by using: git status

This will return a list of changed files and folders from which you can see what was modified. This will better assist you in reverting your hacked up Magento to proper, unmodified core.

Your best bet is to start with a fresh Magento install, then copy over the extensions/design/skin folders one by one and testing to see which is the culprit. It will take time, but it will be worth it knowing that everything is installed, configured and tested properly.

  • Using GIT - awesome, never would have thought of that! I will absolutely do that soon. About the compiler - the live site didn't even have the includes folder (which is the compiler) to begin with. The preview worked until I flushed the cache. Of the three sites the dev site worked after running the compiler then disabling it. Couldn't reproduce on the other two. It's almost like I need Magento to reload the custom code but there doesn't seem to be anyway of doing it since the custom module isn't stored in the core_resource table.
    – Gisto
    Apr 12, 2014 at 1:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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