Skip to content
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

Can not print order invoice since upgrade to 2.4.7 #38688

Closed
1 of 5 tasks
AndeeKnitsLTD opened this issue May 1, 2024 · 3 comments
Closed
1 of 5 tasks

Can not print order invoice since upgrade to 2.4.7 #38688

AndeeKnitsLTD opened this issue May 1, 2024 · 3 comments

Comments

@AndeeKnitsLTD
Copy link

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

  • 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”.
Copy link

m2-assistant bot commented May 1, 2024

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:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@hostep
Copy link
Contributor

hostep commented May 1, 2024

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
Copy link
Author

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

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

No branches or pull requests

2 participants