0

在开发模式下,我可以很好地创建 pdf 发票,但在生产模式下,我得到一个错误。

在销售 > 发票下,我单击“打印”按钮以获取发票的 pdf(见链接)

图片

它现在说:

处理您的请求时出错

警告:strspn() 期望参数 1 是字符串,对象在 >/home/dragoni5/public_html/vendor/magento/zendframework1/library/Zend/Pdf/StringParser.php 第 162 行给出

错误日志说:

a:4:{i:0;s:170:"Warning: strspn() expects parameter 1 to be string, object given in /home/dragoni5/public_html/vendor/magento/zendframework1/library/Zend/Pdf/StringParser.php on line 162";i:1;s:6477:"#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'strspn() expect...', '/home/dragoni5/...', 162, Array)
#1 /home/dragoni5/public_html/vendor/magento/zendframework1/library/Zend/Pdf/StringParser.php(162): strspn(Object(Magento\Framework\ObjectManager\ObjectManager), '\x00\t\n\f\r ', 0)
#2 /home/dragoni5/public_html/vendor/magento/zendframework1/library/Zend/Pdf/StringParser.php(204): Zend_Pdf_StringParser->skipWhiteSpace(false)
#3 /home/dragoni5/public_html/vendor/magento/zendframework1/library/Zend/Pdf/Parser.php(393): Zend_Pdf_StringParser->readComment()
#4 /home/dragoni5/public_html/vendor/magento/zendframework1/library/Zend/Pdf.php(329): Zend_Pdf_Parser->__construct(Object(Magento\Framework\ObjectManager\ObjectManager), Object(Zend_Pdf_ElementFactory_Proxy), false)
#5 /home/dragoni5/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93): Zend_Pdf->__construct(Object(Magento\Framework\ObjectManager\ObjectManager))
#6 /home/dragoni5/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Zend_Pdf', Array)
#7 /home/dragoni5/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(130): Magento\Framework\ObjectManager\Factory\Compiled->create('Zend_Pdf')
#8 /home/dragoni5/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(67): Magento\Framework\ObjectManager\Factory\Compiled->get('Zend_Pdf')
#9 /home/dragoni5/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Compiled->create('Bss\\CheckoutCus...', Array)
#10 /home/dragoni5/public_html/vendor/magento/module-sales/Controller/Adminhtml/Invoice/AbstractInvoice/PrintAction.php(55): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Sales\\M...')
#11 /home/dragoni5/public_html/vendor/magento/framework/App/Action/Action.php(102): Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoice\PrintAction->execute()
#12 /home/dragoni5/public_html/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#13 /home/dragoni5/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#14 /home/dragoni5/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Sales\Controller\Adminhtml\Order\Invoice\PrintAction\Interceptor->___callParent('dispatch', Array)
#15 /home/dragoni5/public_html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Sales\\C...', 'dispatch', Object(Magento\Sales\Controller\Adminhtml\Order\Invoice\PrintAction\Interceptor), Array, 'adminAuthentica...')
#16 /home/dragoni5/public_html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#17 /home/dragoni5/public_html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Sales\Controller\Adminhtml\Order\Invoice\PrintAction\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#18 /home/dragoni5/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Sales\\C...', 'dispatch', Object(Magento\Sales\Controller\Adminhtml\Order\Invoice\PrintAction\Interceptor), Array, 'adminMassaction...')
#19 /home/dragoni5/public_html/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Sales\Controller\Adminhtml\Order\Invoice\PrintAction\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#20 /home/dragoni5/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Sales\Controller\Adminhtml\Order\Invoice\PrintAction\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#21 /home/dragoni5/public_html/var/generation/Magento/Sales/Controller/Adminhtml/Order/Invoice/PrintAction/Interceptor.php(26): Magento\Sales\Controller\Adminhtml\Order\Invoice\PrintAction\Interceptor->___callPlugins('dispatch', Array, Array)
#22 /home/dragoni5/public_html/vendor/magento/framework/App/FrontController.php(55): Magento\Sales\Controller\Adminhtml\Order\Invoice\PrintAction\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#23 /home/dragoni5/public_html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#24 /home/dragoni5/public_html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#25 /home/dragoni5/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#26 /home/dragoni5/public_html/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#27 /home/dragoni5/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#28 /home/dragoni5/public_html/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#29 /home/dragoni5/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#30 /home/dragoni5/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#31 /home/dragoni5/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#32 {main}";s:3:"url";s:119:"/admin123/sales/order_invoice/print/invoice_id/13/key/d885350b88c5ca767ca7932ab376c2f8dcced5eea4e754d65d25a06d645c84e5/";s:11:"script_name";s:10:"/index.php";}

我非常感谢对此的任何反馈。

干杯。

麦克风。

4

0 回答 0