In Magento version 1.9.1.0, we got the error when we create order, invoice, register the user it display the blank page. On register page, user is registered at back end but I didn’t get the new user email.
Solution:
You must have to latest version php 5.4 or greater than.
Magento is using the pealog_emogrifier function used in mail
If you comment this function from the following file
app\code\core\Mage\Core\Model\Email\Template\Abstract.php
Function:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
protected function _applyInlineCss($html) { try { // Check to see if the {{inlinecss file=""}} directive set a CSS file to inline $inlineCssFile = $this->getInlineCssFile(); // Only run Emogrify if HTML exists if (strlen($html) && $inlineCssFile) { $cssToInline = $this->_getCssFileContent($inlineCssFile); $emogrifier = new Pelago_Emogrifier(); $emogrifier->setHtml($html); $emogrifier->setCss($cssToInline); // Don't parse inline <style> tags, since existing tag is intentionally for no-inline styles $emogrifier->setParseInlineStyleTags(false); $processedHtml = $emogrifier->emogrify(); } else { $processedHtml = $html; } } catch (Exception $e) { $processedHtml = '{CSS inlining error: ' . $e->getMessage() . '}' . PHP_EOL . $html; } return $processedHtml; } |
Replace the code with below code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
protected function _applyInlineCss($html) { try { // Check to see if the {{inlinecss file=""}} directive set a CSS file to inline $inlineCssFile = $this->getInlineCssFile(); // Only run Emogrify if HTML exists if (strlen($html) && $inlineCssFile) { $processedHtml = $html; } else { $processedHtml = $html; } } catch (Exception $e) { $processedHtml = '{CSS inlining error: ' . $e->getMessage() . '}' . PHP_EOL . $html; } return $processedHtml; } |