Skip to content

Null order in Print All Shipments guest page (Magento\Sales\Block\Order\PrintShipment.php) #28861

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

Closed
5 tasks
themystery404 opened this issue Jun 24, 2020 · 15 comments
Assignees
Labels
Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Reported on 2.3.4 Indicates original Magento version for the Issue report.

Comments

@themystery404
Copy link

Preconditions (*)

  1. Magento v2.3.4

Steps to reproduce (*)

  1. Place an order as guest user and create shipment for it.
  2. Go to http://example.com/sales/guest/shipment/order_id/123456/
  3. Change tab on "Order Shipment".
  4. Click on "Print All Shipment" link

Expected result (*)

  1. All the shipments are printed without any errors

Actual result (*)

  1. All the shipments are printed, but an error with following message is generated:

[04-May-2020 21:27:20 UTC] PHP Fatal error: Uncaught Error: Call to a member function getRealOrderId() on null in /magento2/vendor/magento/module-sales/Block/Order/PrintOrder/Shipment.php:98


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Jun 24, 2020

Hi @themystery404. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

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

Please, add a comment to assign the issue: @magento I am working on this


@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Jun 24, 2020
@swathishs swathishs self-assigned this Jun 24, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jun 24, 2020

Hi @swathishs. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@swathishs
Copy link

@magento give me 2.4-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @swathishs. Thank you for your request. I'm working on Magento 2.4-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @swathishs, here is your Magento instance.
Admin access: https://i-28861-2-4-develop.instances.magento-community.engineering/admin_2b00
Login: 1a890239 Password: c00b075abafb
Instance will be terminated in up to 3 hours.

@swathishs
Copy link

Hi, @themystery404 : Could you please let me know how to recreate the issue. So that I can able to recreate the issue.

I tried to recreate with these steps:

  1. Place an order as a guest user
  2. Go to admin
  3. Click on sales- order
  4. In order to click on the shipment
  5. Sales- shipment
  6. Click on print.

Attachments:

  1. Shipment:
    image

  2. Able to print shipment:
    image

@swathishs
Copy link

Duplicate of ##9830

@themystery404
Copy link
Author

@swathishs it's not duplicate - it's the same issue, but for not registered user in the guest page http://example.com/sales/guest/shipment/order_id/123456/

Shipment is printing, but in your logs you can see an error PHP Fatal.

Try to print your shipment for not registered user from storefront

@swathishs
Copy link

@magento give me 2.4-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @swathishs. Thank you for your request. I'm working on Magento 2.4-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @swathishs, here is your Magento instance.
Admin access: https://i-28861-2-4-develop.instances.magento-community.engineering/admin_d7cc
Login: c9cf5d5b Password: 03c4fa23c05e
Instance will be terminated in up to 3 hours.

@sdzhepa
Copy link
Contributor

sdzhepa commented Jun 25, 2020

@magento give me 2.4-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @sdzhepa. Thank you for your request. I'm working on Magento 2.4-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @sdzhepa, here is your Magento instance.
Admin access: https://i-28861-2-4-develop.instances.magento-community.engineering/admin_40d3
Login: 7c77698e Password: d8a5f62c9535
Instance will be terminated in up to 3 hours.

@sdzhepa
Copy link
Contributor

sdzhepa commented Jun 25, 2020

Hello @themystery404
fyi: @swnsma

I am also not able to reproduce this on the lates 2.4-develop code.
It seems the issue was already fixed and we can close this report and related PR

Precondition

  • create simple product
  • place order with this simple product on Storefront as Guest Customer(e.g. Order id 000000001)
  • Go to Admin Panel and create Shippment for this order

Steps

  1. Go to Storefront as a Guest
  2. Scroll down to the footer and click Order and Returns link (url example : https://magento/sales/guest/form/ )
  3. Fill "Order ID", "Billing Last Name", "Find Order By = Email" and "Email"
  4. Click "Continue"
  5. Result: Order details page is opened, URL: https://magento/sales/guest/shipment/order_id/81/
  6. Click to open Order Shipments tab
  7. Click all links related to print PDF and save docs:
    -- Print All Shipments
    -- Print Shipment
    -- Print Order

2020-06-25_14-51-31

Results:

  • All PDFs were saved with correct data
  • there is no PHP Fatal error: Uncaught Error: Call to a member function getRealOrderId() in system.log and exception.log

@sdzhepa sdzhepa closed this as completed Jun 25, 2020
@magento-engcom-team magento-engcom-team added the Reported on 2.3.4 Indicates original Magento version for the Issue report. label Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Reported on 2.3.4 Indicates original Magento version for the Issue report.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants