jose
jose

Reputation: 1

Blank screen when attempting to view an order after magento upgrade 1.9.1

I've got this error after moving from magento 1.7 to magento 1.9.1.
In the beginning, it was a blank page. I enabled display error and I got this:

Fatal error: Undefined class constant 'ACTION_FLAG_PRODUCTS_PERMISSION_DENIED' in /var/www/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php on line 119

Code:

  public function viewAction()
    {
        $this->_title($this->__('Sales'))->_title($this->__('Orders'));

        $order = $this->_initOrder();
        if ($order) {

            $isActionsNotPermitted = $order->getActionFlag(
                Mage_Sales_Model_Order::ACTION_FLAG_PRODUCTS_PERMISSION_DENIED
          );
            if ($isActionsNotPermitted) {
                $this->_getSession()->addError($this->__('You don\'t have      permissions to manage this order because of one or more products are not     permitted for your website.'));
            }

            $this->_initAction();

            $this->_title(sprintf("#%s", $order->getRealOrderId()));

            $this->renderLayout();
         }
     }

I am using php 5.3. I changed the folders permissions, but it didn't work as per other suggestions.

Upvotes: 0

Views: 535

Answers (1)

Justin Simon
Justin Simon

Reputation: 26

Before the line:

$this->renderLayout();

You should load the layout using the following function call:

$this->loadLayout();

Upvotes: 0

Related Questions