Skip to content

Print order error on magento 2.1.8 #10530

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
ionutdicu opened this issue Aug 14, 2017 · 13 comments
Closed

Print order error on magento 2.1.8 #10530

ionutdicu opened this issue Aug 14, 2017 · 13 comments
Labels
Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@ionutdicu
Copy link

ionutdicu commented Aug 14, 2017

Preconditions

  1. Magento 2.1.9

Steps to Reproduce

  1. Login as customer
  2. Place order
  3. Go to "My account" page on frontend
  4. Click on your order
  5. Click "Print Order"

Actual Result

Exception (Magento\Framework\Exception\LocalizedException): Invalid method Magento\Sales\Block\Order\PrintShipment::isPagerDisplayed<br>
#0 \vendor\magento\module-sales\view\frontend\templates\order\items.phtml(15): Magento\Framework\DataObject->__call('isPagerDisplaye...', Array)

Expected result

  1. Order is printable
@pboisvert
Copy link

pboisvert commented Aug 14, 2017

Can you please follow the reporting template in terms of providing pre-conditions (configurations other than 2.1.8) , steps to reproduce when reporting an issue.

@ionutdicu
Copy link
Author

This exception appear on frontend customer Dashboard(Recent Orders->Order View->Print Order) after upgrade magento 2.1.7 at 2.1.8.

@vityakopin
Copy link

Unfortunately, I could not reproduce the issue as you described it. Please add more details to your description of the steps you followed when identifying this issue. In addition, identify the web server you are running, the versions of PHP and MySQL, and any other information needed to reproduce your issue.

@tureki
Copy link

tureki commented Aug 29, 2017

I think M2 sale module given wrong block class for sales_order_print.xml

Temporary way:
open [module-sale] view -> frontend -> layout -> sales_order_print.xml. then modify line 20

<block class="Magento\Sales\Block\Order\PrintShipment" name="order_items" template="order/items.phtml">

to

<block class="Magento\Sales\Block\Order\Items" name="order_items" template="order/items.phtml">

Then it will be fine.


If u r using custom theme just override the layout file to hotfix it. (no need change M2 source code)

@magento-engcom-team magento-engcom-team added Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Progress: needs update Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch labels Sep 11, 2017
@gigadesign1
Copy link

I'm having the same issue in Magento 2.1.8 and Magento 2.1.9.

In the layout.xml the block is defined as:
<block class="Magento\Sales\Block\Order\PrintShipment" name="order_items" template="order/items.phtml">

In the items.phtml template it states:
/** @var \Magento\Sales\Block\Order\Items $block */

Clearly, this is incorrect.

The template calls for
$block->isPagerDisplayed()

This function is not defined in Magento\Sales\Block\Order\PrintShipment, but is defined in Magento\Sales\Block\Order\Items

@magento-engcom-team
Copy link
Contributor

Please follow the issue reporting template for future reports.

@grizwako
Copy link

I am having the same issue on Magento 2.1.8.

Preconditions:
Magento 2.1.8 installed
Created configurable products manually in admin.

Steps to reproduce:
Login as customer
Place order using one of created products
Go to your customer page on frontend
Click on your order
Click "Print Order"

Expected Results:
Seeing "order details" in a print friendly render

Actual Results:
Exception (Magento\Framework\Exception\LocalizedException): Invalid method Magento\Sales\Block\Order\PrintShipment::isPagerDisplayed

@magento-engcom-team
Copy link
Contributor

@ionutdicu We have updated issue report to follow guidelines.

@magento-engcom-team magento-engcom-team added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Progress: needs update Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Sep 27, 2017
@magento-engcom-team
Copy link
Contributor

@ionutdicu, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.

@magento-engcom-team magento-engcom-team added the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Sep 27, 2017
@santhoshnsscoe
Copy link

We are also facing the same problem after update to 2.1.9.

If development mode is enabled then, on Print Order, giving the below error.

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid method Magento\Sales\Block\Order\PrintShipment::isPagerDisplayed

Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid method Magento\Sales\Block\Order\PrintShipment::isPagerDisplayed
#0 vendor/magento/module-sales/view/frontend/templates/order/items.phtml(15): Magento\Framework\DataObject->__call('isPagerDisplaye...', Array)

If production mode is enabled, then the items are missing in the print out. Below is the screenshot.
https://www.screencast.com/t/Trv5bZhQvl0q

@fooman fooman reopened this Nov 9, 2017
@fooman fooman removed the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Nov 9, 2017
@okorshenko
Copy link
Contributor

The issue has been fixed in 2.1-develop branch and will be available with next patch release

@okorshenko okorshenko added Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.1.x The issue has been fixed in 2.1 release line and removed Fixed in 2.2.x The issue has been fixed in 2.2 release line labels Nov 9, 2017
@sidolov
Copy link
Contributor

sidolov commented Sep 25, 2018

Hi @ionutdicu. Thank you for your report.
The issue has been fixed in #17998 by @MateuszChrapek in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.8 release.

@slavvka
Copy link
Member

slavvka commented Oct 3, 2018

Hi @ionutdicu. Thank you for your report.
The issue has been fixed in #18272 by @mage2pratik in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.1 release.

@slavvka slavvka added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests