magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.54k stars 9.32k forks source link

Can not print order invoice since upgrade to 2.4.7 #38688

Closed AndeeKnitsLTD closed 6 months ago

AndeeKnitsLTD commented 6 months ago

Preconditions and environment

Magento 2.4.7

Upgraded from 2.4.6p5 and invoice print function creates critical error. Clean install of 2.4.7 transferred data from original website and invoice print function creates critical error

Steps to reproduce

1) Navigate to admin / sales / orders / view (any) order / invoices / print

Expected result

Invoice PDF for printing

Actual result

An error has happened during application run. See exception log for details.

Additional information

[2024-05-01T08:45:30.322327+00:00] main.CRITICAL: Error: Call to undefined function Magento\Framework\File\Pdf\ImageResource\tmpfile() in /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/File/Pdf/ImageResource/ImageFactory.php:69 Stack trace:

0 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/File/Pdf/ImageResource/ImageFactory.php(49): Magento\Framework\File\Pdf\ImageResource\ImageFactory->createTemporaryFileAndPutContent()

1 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/File/Pdf/Image.php(37): Magento\Framework\File\Pdf\ImageResource\ImageFactory->factory()

2 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/module-sales/Model/Order/Pdf/AbstractPdf.php(291): Magento\Framework\File\Pdf\Image->imageWithPathAdvanced()

3 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/module-sales/Model/Order/Pdf/Invoice.php(140): Magento\Sales\Model\Order\Pdf\AbstractPdf->insertLogo()

4 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/module-sales/Controller/Adminhtml/Invoice/AbstractInvoice/Pdfinvoices.php(78): Magento\Sales\Model\Order\Pdf\Invoice->getPdf()

5 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/module-sales/Controller/Adminhtml/Order/AbstractMassAction.php(62): Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoice\Pdfinvoices->massAction()

6 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Sales\Controller\Adminhtml\Order\AbstractMassAction->execute()

7 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Controller\Adminhtml\Invoice\Pdfinvoices\Interceptor->___callParent()

8 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Controller\Adminhtml\Invoice\Pdfinvoices\Interceptor->Magento\Framework\Interception{closure}()

9 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/generated/code/Magento/Sales/Controller/Adminhtml/Invoice/Pdfinvoices/Interceptor.php(23): Magento\Sales\Controller\Adminhtml\Invoice\Pdfinvoices\Interceptor->___callPlugins()

10 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/App/Action/Action.php(111): Magento\Sales\Controller\Adminhtml\Invoice\Pdfinvoices\Interceptor->execute()

11 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/module-backend/App/AbstractAction.php(151): Magento\Framework\App\Action\Action->dispatch()

12 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch()

13 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Controller\Adminhtml\Invoice\Pdfinvoices\Interceptor->___callParent()

14 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(145): Magento\Sales\Controller\Adminhtml\Invoice\Pdfinvoices\Interceptor->Magento\Framework\Interception{closure}()

15 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch()

16 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Controller\Adminhtml\Invoice\Pdfinvoices\Interceptor->Magento\Framework\Interception{closure}()

17 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/generated/code/Magento/Sales/Controller/Adminhtml/Invoice/Pdfinvoices/Interceptor.php(32): Magento\Sales\Controller\Adminhtml\Invoice\Pdfinvoices\Interceptor->___callPlugins()

18 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/App/FrontController.php(245): Magento\Sales\Controller\Adminhtml\Invoice\Pdfinvoices\Interceptor->dispatch()

19 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse()

20 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/App/FrontController.php(146): Magento\Framework\App\FrontController->processRequest()

21 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch()

22 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent()

23 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}()

24 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins()

25 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()

26 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Http->launch()

27 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\Http\Interceptor->___callParent()

28 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/module-application-performance-monitor/Plugin/ApplicationPerformanceMonitor.php(38): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception{closure}()

29 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\ApplicationPerformanceMonitor\Plugin\ApplicationPerformanceMonitor->aroundLaunch()

30 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception{closure}()

31 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http\Interceptor->___callPlugins()

32 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()

33 /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/pub/index.php(30): Magento\Framework\App\Bootstrap->run()

34 {main} {"exception":"[object] (Error(code: 0): Call to undefined function Magento\Framework\File\Pdf\ImageResource\tmpfile() at /home/1125497.cloudwaysapps.com/hwxbupurve/public_html/vendor/magento/framework/File/Pdf/ImageResource/ImageFactory.php:69)"} []

Release note

No response

Triage and priority

m2-assistant[bot] commented 6 months ago

Hi @AndeeKnitsLTD. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

hostep commented 6 months ago

That's unexpected but at first sight it doesn't sound like a Magento bug. Because the tmpfile is just a regular php function. Maybe your environment disables this function or something? Check https://stackoverflow.com/a/69172999

AndeeKnitsLTD commented 6 months ago

@hostep looks like you were spot on, thank you! I fix knitting machines not websites so not a clue but can follow detailed instructions!!