• Resolved nssdke

    (@nssdke)


    Hi

    I am not able to download pdf invoice.

    WordPress 7.0

    WebToffee PDF Invoices 4.9.5

    PHP 8.5.6

    The error I have received is:



    Detaljer om fejl
    ================
    En fejl af typen E_ERROR skete i linje 96 i filen /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/dompdf/dompdf/src/FrameReflower/Block.php. Fejlbesked: Uncaught Error: Call to a member function get_content_box() on null in /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/dompdf/dompdf/src/FrameReflower/Block.php:96
    Stack trace:
    #0 /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/dompdf/dompdf/src/FrameReflower/Block.php(236): Wtpklistpdf\Dompdf\FrameReflower\Block->_calculate_width('auto')
    #1 /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/dompdf/dompdf/src/FrameReflower/Block.php(811): Wtpklistpdf\Dompdf\FrameReflower\Block->_calculate_restricted_width()
    #2 /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(905): Wtpklistpdf\Dompdf\FrameReflower\Block->reflow(NULL)
    #3 /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/dompdf/dompdf/src/FrameReflower/Inline.php(161): Wtpklistpdf\Dompdf\FrameDecorator\AbstractFrameDecorator->reflow(NULL)
    #4 /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(905): Wtpklistpdf\Dompdf\FrameReflower\Inline->reflow(NULL)
    #5 /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/dompdf/dompdf/src/FrameReflower/Inline.php(161): Wtpklistpdf\Dompdf\FrameDecorator\AbstractFrameDecorator->reflow(NULL)
    #6 /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(905): Wtpklistpdf\Dompdf\FrameReflower\Inline->reflow(NULL)
    #7 /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/dompdf/dompdf/src/FrameReflower/Page.php(142): Wtpklistpdf\Dompdf\FrameDecorator\AbstractFrameDecorator->reflow()
    #8 /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(905): Wtpklistpdf\Dompdf\FrameReflower\Page->reflow(NULL)
    #9 /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/vendor/dompdf/dompdf/src/Dompdf.php(808): Wtpklistpdf\Dompdf\FrameDecorator\AbstractFrameDecorator->reflow()
    #10 /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/class-dompdf.php(73): Wtpklistpdf\Dompdf\Dompdf->render()
    #11 /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/includes/class-wf-woocommerce-packing-list-pdf_generator.php(107): Wt_Pklist_Dompdf->generate('/var/www/pallet...', '...', 'attach', false, '/var/www/pallet...', Array)
    #12 /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/admin/modules/customizer/customizer.php(1223): Wf_Woocommerce_Packing_List_Pdf_generator::generate_pdf('...', 'invoice', 'Invoice_2117', 'attach')
    #13 /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/public/modules/invoice/invoice.php(1683): Wf_Woocommerce_Packing_List_Customizer->generate_template_pdf('...', 'invoice', 'Invoice_2117', 'attach')
    #14 /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/public/modules/invoice/invoice.php(1620): Wf_Woocommerce_Packing_List_Invoice->prepare_pdf_attachments(2117)
    #15 /var/www/palletanke.dk/public_html/wp-includes/class-wp-hook.php(341): Wf_Woocommerce_Packing_List_Invoice->add_email_attachments(Array, Object(Automattic\WooCommerce\Admin\Overrides\Order), 2117, 'customer_comple...')
    #16 /var/www/palletanke.dk/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)
    #17 /var/www/palletanke.dk/public_html/wp-content/plugins/print-invoices-packing-slip-labels-for-woocommerce/admin/class-wf-woocommerce-packing-list-admin.php(415): apply_filters('wt_email_attach...', Array, Object(Automattic\WooCommerce\Admin\Overrides\Order), 2117, 'customer_comple...')
    #18 /var/www/palletanke.dk/public_html/wp-includes/class-wp-hook.php(341): Wf_Woocommerce_Packing_List_Admin->add_email_attachments(Array, 'customer_comple...', Object(Automattic\WooCommerce\Admin\Overrides\Order), Object(WC_Email_Customer_Completed_Order))
    #19 /var/www/palletanke.dk/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)
    #20 /var/www/palletanke.dk/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php(720): apply_filters('woocommerce_ema...', Array, 'customer_comple...', Object(Automattic\WooCommerce\Admin\Overrides\Order), Object(WC_Email_Customer_Completed_Order))
    #21 /var/www/palletanke.dk/public_html/wp-content/plugins/woocommerce/includes/emails/class-wc-email-customer-completed-order.php(79): WC_Email->get_attachments()
    #22 /var/www/palletanke.dk/public_html/wp-includes/class-wp-hook.php(343): WC_Email_Customer_Completed_Order->trigger(2117, Object(Automattic\WooCommerce\Admin\Overrides\Order))
    #23 /var/www/palletanke.dk/public_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters('', Array)
    #24 /var/www/palletanke.dk/public_html/wp-includes/plugin.php(570): WP_Hook->do_action(Array)
    #25 /var/www/palletanke.dk/public_html/wp-content/plugins/woocommerce/includes/class-wc-emails.php(219): do_action_ref_array('woocommerce_ord...', Array)
    #26 /var/www/palletanke.dk/public_html/wp-includes/class-wp-hook.php(341): WC_Emails::send_transactional_email(Array, Object(Automattic\WooCommerce\Admin\Overrides\Order), Array)
    #27 /var/www/palletanke.dk/public_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array)
    #28 /var/www/palletanke.dk/public_html/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
    #29 /var/www/palletanke.dk/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(456): do_action('woocommerce_ord...', 2117, Object(Automattic\WooCommerce\Admin\Overrides\Order), Array)
    #30 /var/www/palletanke.dk/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(285): WC_Order->status_transition()
    #31 /var/www/palletanke.dk/public_html/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php(828): WC_Order->save()
    #32 /var/www/palletanke.dk/public_html/wp-includes/class-wp-hook.php(343): WC_Meta_Box_Order_Data::save(2117)
    #33 /var/www/palletanke.dk/public_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array)
    #34 /var/www/palletanke.dk/public_html/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
    #35 /var/www/palletanke.dk/public_html/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-meta-boxes.php(262): do_action('woocommerce_pro...', 2117, Object(WP_Post))
    #36 /var/www/palletanke.dk/public_html/wp-includes/class-wp-hook.php(343): WC_Admin_Meta_Boxes->save_meta_boxes(2117, Object(WP_Post))
    #37 /var/www/palletanke.dk/public_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(2117, Array)
    #38 /var/www/palletanke.dk/public_html/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
    #39 /var/www/palletanke.dk/public_html/wp-includes/post.php(5193): do_action('save_post', 2117, Object(WP_Post), true)
    #40 /var/www/palletanke.dk/public_html/wp-includes/post.php(5295): wp_insert_post(Array, false, true)
    #41 /var/www/palletanke.dk/public_html/wp-admin/includes/post.php(449): wp_update_post(Array)
    #42 /var/www/palletanke.dk/public_html/wp-admin/post.php(227): edit_post()
    #43 {main}
      thrown

    Can you please help me fix this?

    Thank you in advance.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Mike

    (@mikewtsupport)

    Hi @nssdke,

    Thanks for reaching out.

    We were able to identify and resolve the issue. The fix will be included in an upcoming plugin release. As a workaround in the meantime, kindly install and activate the mPDF plugin and then switch the PDF library to mPDF from: Invoice/Packing > General Settings > General > PDF Library

    After making this change, please test the PDF generation again. This should resolve the issue until the official plugin update is released.

    Hi, we also found this today while testing plugin updates in our staging environment. Looks like we will have to downgrade and prevent this going to production as per-site overrides as you suggest aren’t practical. Any ETA for the fix?

    Plugin Support Mike

    (@mikewtsupport)

    Hi @ablears,

    We have already implemented a fix for this issue and it has been added to our development pipeline. The fix is currently undergoing testing and will be included in an upcoming plugin release.

    At the moment, we are unable to provide a firm ETA for the release, as we want to ensure the fix is thoroughly tested before it is made publicly available.

    In the meantime, as a workaround, you may install and activate the mPDF plugin on your staging environment and then switch the PDF library to mPDF from: Invoice/Packing > General Settings > General > PDF Library and check.

    If this resolves the issue during your testing, you may consider deploying the same configuration to your production environment as part of your standard release process while we work on releasing the official fix.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.