Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't View Order in Frontend #4384

Closed
kiatng opened this issue Nov 26, 2024 · 2 comments · Fixed by #4385
Closed

Can't View Order in Frontend #4384

kiatng opened this issue Nov 26, 2024 · 2 comments · Fixed by #4385

Comments

@kiatng
Copy link
Contributor

kiatng commented Nov 26, 2024

I updated a production site today and immediately complaints started on not able to view order details in frontend > Account > My Orders > View Order. Or on checkout success page, link to Order page.

Following errors from DDEV:

Fatal error: Uncaught Error: Call to a member function getGiftMessageAvailable() on null in /var/www/html/app/code/core/Mage/GiftMessage/Helper/Message.php:129
Stack trace:
0 /var/www/html/app/code/core/Mage/GiftMessage/Helper/Message.php(188): Mage_GiftMessage_Helper_Message->isMessagesAvailable('items', Object(Mage_Sales_Model_Order), NULL)
1 /var/www/html/app/code/core/Mage/Sales/Block/Order/View.php(129): Mage_GiftMessage_Helper_Message->getIsMessagesAvailable('items', Object(Mage_Sales_Model_Order))
2 /var/www/html/app/design/frontend/base/default/template/sales/order/view.phtml(22): Mage_Sales_Block_Order_View->canDisplayGiftmessageItems()
3 /var/www/html/app/code/core/Mage/Core/Block/Template.php(272): include('/var/www/html/a...')
4 /var/www/html/app/code/core/Mage/Core/Block/Template.php(309): Mage_Core_Block_Template->fetchView('frontend/base/d...')
5 /var/www/html/app/code/core/Mage/Core/Block/Template.php(322): Mage_Core_Block_Template->renderView()
6 /var/www/html/app/code/core/Mage/Core/Block/Abstract in /var/www/html/app/code/core/Mage/GiftMessage/Helper/Message.php on line 129

Preconditions (*)

Ref PR #4348

Steps to reproduce (*)

DDEV

  1. Turn off Gift Optins in backend > Sales > Gift Options > Allow Gift Messages on Order Level = No, Allow Gift Messages for Order Items = No
  2. Create a new order in frontend, click on the order link to view details
  3. Fatal error: Uncaught Error: Call to a member function getGiftMessageAvailable()
@sreichel
Copy link
Contributor

sreichel commented Feb 4, 2025

@all-contributors add @kiatng bug

Copy link
Contributor

@sreichel

@kiatng already contributed before to bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants