Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Blank Page at view_order after Upgrade from 1.7. to 1.8.1.0
 
Xeven
Jr. Member
 
Total Posts:  3
Joined:  2008-11-15
 

Hi everyone,

first at all i wish you all a happy new year.

I have the following problem and that anyone can help me.

After a upgrade from 1.7.0.2 to 1.8.1.0 and few problems the shop is running.

But i can’t fix one problem.

If i want open an order e.g. http://domain.tld/index.php/admin/sales_order/view/order_id/123/ i get only a white page.

I have activated in index.php “ini_set(’display_errors’, 1);” and got the following error:

Fatal errorUndefined class constant 'ACTION_FLAG_PRODUCTS_PERMISSION_DENIED' in /var/www/vhosts/directory-to-shop/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php on line 119

Anyone know the solution for this problem?

Thanks in advance!!

Best regards

 
Magento Community Magento Community
Magento Community
Magento Community
 
Xeven
Jr. Member
 
Total Posts:  3
Joined:  2008-11-15
 

Update:

if i comment the following lines out, everything is working fine. but thats not the reason.

File: /app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php line 117

$isActionsNotPermitted $order->getActionFlag(
    
Mage_Sales_Model_Order::ACTION_FLAG_PRODUCTS_PERMISSION_DENIED
);

Best regards

 
Magento Community Magento Community
Magento Community
Magento Community
 
jeremybokobza
Jr. Member
 
Total Posts:  1
Joined:  2013-08-22
 

I have the same problem.

 
Magento Community Magento Community
Magento Community
Magento Community
 
fujillama
Jr. Member
 
Total Posts:  1
Joined:  2013-05-08
 

try this code, I have worked for me

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

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

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

$this->renderLayout();
}
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
David999
Jr. Member
 
Total Posts:  2
Joined:  2012-10-22
 

I had the same problem too.
It must be down to a customisation of the admin panel.
The value of the constant is not being picked up correctly.
It’s defined in app/code/core/Mage/Sales/Model/Order.php
So you could update the core code with the value of the constant to get round the immediate problem
ie. edit line 117 onwards of app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php
to comment out the original code and put in the value e.g

/* Commented out to avoid missing constant error preventing viewing of orders
$isActionsNotPermitted = $order->getActionFlag(
Mage_Sales_Model_Order::ACTION_FLAG_PRODUCTS_PERMISSION_DENIED
);*/
$isActionsNotPermitted = $order->getActionFlag(
‘product_permission_denied’
);

You now have until the next Mage update to find the rogue customisation

 
Magento Community Magento Community
Magento Community
Magento Community
 
David999
Jr. Member
 
Total Posts:  2
Joined:  2012-10-22
 

... Better still

Before changing the core code look to see if you’ve overridden the class in local code then add the constant into your local code

Find the definition of ACTION_FLAG_PRODUCTS_PERMISSION_DENIED in file app/code/core/Mage/Sales/Model/Order.php
which should read:
const ACTION_FLAG_PRODUCTS_PERMISSION_DENIED= ‘product_permission_denied’;

and paste that into the same section in app/code/local/Mage/Sales/Model/Order.php
Then disable compilation and the caches, test it works ok then re-compile and enable the caches.

 
Magento Community Magento Community
Magento Community
Magento Community
 
GoMageTeam
Guru
 
Avatar
Total Posts:  356
Joined:  2013-01-13
Warsaw, Poland
 

Hello,

It seems that the tips above should help you.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top