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)
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.
This exception appear on frontend customer Dashboard(Recent Orders->Order View->Print Order) after upgrade magento 2.1.7 at 2.1.8.
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.
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)
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 MagentoSalesBlockOrderPrintShipment, but is defined in MagentoSalesBlockOrderItems
Please follow the issue reporting template for future reports.
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 (MagentoFrameworkExceptionLocalizedException): Invalid method MagentoSalesBlockOrderPrintShipment::isPagerDisplayed
@ionutdicu We have updated issue report to follow guidelines.
@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.
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
The issue has been fixed in 2.1-develop branch and will be available with next patch release
Hi @ionutdicu. Thank you for your report.
The issue has been fixed in magento/magento2#17998 by @MateuszChrapek in 2.2-develop branch
Related commit(s):
The fix will be available with the upcoming 2.2.8 release.
Hi @ionutdicu. Thank you for your report.
The issue has been fixed in magento/magento2#18272 by @mage2pratik in 2.3-develop branch
Related commit(s):
The fix will be available with the upcoming 2.3.1 release.
Most helpful comment
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 20to
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)