I recently upgraded a Magento CE instance from 1.9.0.1 to 1.9.1.0. The upgrade was performed using Magento Connect (aka Downloader).
I'm noticing now that when new orders are placed on the backend, after submit the application returns a blank page. The orders are captured.
However, now we are unable to send tracking numbers when shipments are created for the same reason. Upon submit (to send the customer the tracking number), a blank page is returned in Admin and the email does not send out to the customer.
Any help is greatly appreciated.
In the exception log, I see this but am not sure it's related at this point:
2015-03-17T14:47:00+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'Invalid block type: ' in /var/www/html/magento/app/Mage.php:595
Stack trace:
#0 /var/www/html/magento/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
#1 /var/www/html/magento/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('', Array)
#2 /var/www/html/magento/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('', 'checkout.cart')
#3 /var/www/html/magento/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('', 'checkout.cart')
#4 /var/www/html/magento/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layou
t_Element), Object(Mage_Core_Model_Layout_Element))
#5 /var/www/html/magento/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layou
t_Element))
#6 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlock
s()
#8 /var/www/html/magento/app/code/core/Mage/Checkout/controllers/CartController.php(177): Mage_Core_Controller_Varien_Action->loadLayout()
#9 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Checkout_CartController->indexAction()
#10 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch(
'index')
#11 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Obje
ct(Mage_Core_Controller_Request_Http))
#12 /var/www/html/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#13 /var/www/html/magento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#14 /var/www/html/magento/index.php(87): Mage::run('', 'store')
#15 {main}
UPDATE: 2015-03-19 — I'm seeing the following error in $MAGE/var/log/system.log:
2015-03-19T23:18:15+00:00 ERR (3): Warning: simplexml_load_string(): </layo> in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
UPDATE: 2015-03-27 — I fixed the issue from the last update (the closing tag) but am still getting the blank page on order submit and when attempting to send the shipping tracking email.
UPDATE: 2015-03-27 — I think I've isolated the issue now. When I attempt to Send the Tracking Email, I'm seeing the following error in /var/log/httpd/error_log:
[Fri Mar 27 12:55:37.491424 2015] [:error] [pid 9974] [client xx.xxx.xxx.xxx:55842] PHP Fatal error: Call to undefined function mb_convert_encoding() in /var/www/html/magento/lib/Pelago/Emogrifier.php on line 556, referer: http://domain/index.php/admin/sales_order_shipment/view/shipment_id/936/key/d78c40f1d7b3198ca38f9b0e1259518f/
I checked my backup from 1.9.0.1 and this file is NOT in /lib. In fact, there is no $mage/lib/Pelago directory.
UPDATE: 2015-03-27 — here is the function referenced in the error just above:
/**
542 * Returns the HTML with the non-ASCII characters converts into HTML entities and the unprocessable HTML tags removed.
543 *
544 * @return string the unified HTML
545 *
546 * @throws \BadMethodCallException
547 */
548 private function getUnifiedHtml() {
549 if (!empty($this->unprocessableHtmlTags)) {
550 $unprocessableHtmlTags = implode('|', $this->unprocessableHtmlTags);
551 $bodyWithoutUnprocessableTags = preg_replace('/<\\/?(' . $unprocessableHtmlTags . ')[^>]*>/i', '', $this->html);
552 } else {
553 $bodyWithoutUnprocessableTags = $this->html;
554 }
555
556 return mb_convert_encoding($bodyWithoutUnprocessableTags, 'HTML-ENTITIES', self::ENCODING);
557 }
If I comment out line 556, the email sends but (obviously), it's blank. However, I believe this is the issue I'm attempting to resolve.
Best Answer
Please ensure that you have the
mbstring
extension installed & available to PHP.