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.
- domain.com (live site)
- dev.domain.com (dev site setup by a previous developer)
- 192.168.1.1/domain (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!
EDIT
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)?
EDIT
Here's the exception.log
output:
localhost
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.
domain.com
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.