Skip to content

9830 - Null order in Magento\Sales\Block\Order\PrintShipment.php#17998

Merged
magento-engcom-team merged 2 commits intomagento:2.2-developfrom
MateuszChrapek:issue/9830
Sep 25, 2018
Merged

9830 - Null order in Magento\Sales\Block\Order\PrintShipment.php#17998
magento-engcom-team merged 2 commits intomagento:2.2-developfrom
MateuszChrapek:issue/9830

Conversation

@MateuszChrapek
Copy link
Contributor

DESCRIPTION
When trying to print the order information from customer's account view the following error is placed in httpd logs:
Fatal error: Call to a member function getRealOrderId() on null in /vendor/magento/module-sales/Block/Order/PrintShipment.php
The cause of this was additional AJAX request taking place after closing the print prompt as discussed by @ihor-sviziev in #9830, trying to render print information one additional time, however without registry properly initialized, it results in the error. I've changed the block that was causing this issue to be uncachable, which seems to be fixing the problem. I've also added changes that were added to 2.1 from #10530 that were not present in 2.2.

FIXED ISSUES

MANUAL TESTING SCENARIOS

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Sep 9, 2018

CLA assistant check
All committers have signed the CLA.

@magento-engcom-team
Copy link
Contributor

Hi @MateuszChrapek. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me {$VERSION} instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-2940 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

Hi @MateuszChrapek. Thank you for your contribution.
We will aim to release these changes as part of 2.2.8.
Please check the release notes for final confirmation.

Please, consider to port this solution to 2.3 release line.
You may use Porting tool to port commits automatically.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants