Home › Forums › WooCommerce Checkout Fields & Options Manager › Error with Mpdf
Tagged: Error 500
- This topic has 7 replies, 2 voices, and was last updated 3 years, 11 months ago by nmedia.
-
AuthorPosts
-
September 29, 2020 at 3:55 pm #19446CubeParticipant
Hi,
i’ve got an error 500 because of the mpdf lib, that can’t be find by your plugin.
The order is saved but no email is send and the user got an error on after the checkout.
This is the log :2020-09-29T16:51:42+02:00 CRITICAL Uncaught Error: Class 'Mpdf\Mpdf' not found in /var/www/clients/client12/web81/web/wp-content/plugins/n-media-woocommerce-checkout-fields/classes/cfom.order.php:32 Stack trace: #0 /var/www/clients/client12/web81/web/wp-content/plugins/n-media-woocommerce-checkout-fields/classes/cfom.class.php(296): CFOM_Order->__construct(24028) #1 /var/www/clients/client12/web81/web/wp-includes/class-wp-hook.php(287): CFOM_Manager->show_order_in_email(Object(WC_Order), false, false, Object(WC_Email_Customer_Completed_Order)) #2 /var/www/clients/client12/web81/web/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #3 /var/www/clients/client12/web81/web/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #4 /var/www/clients/client12/web81/web/wp-content/plugins/woocommerce/templates/emails/customer-completed-order.php(50): do_action('woocommerce_ema...', Object(WC_Order), false, false, Object(WC_Email_Customer_Completed_Order)) #5 /var/www/clients/client12/web81/web/wp-content/plugins/woocommerce/includ dans /var/www/clients/client12/web81/web/wp-content/plugins/n-media-woocommerce-checkout-fields/classes/cfom.order.php à la ligne 32
September 30, 2020 at 8:26 am #19456CubeParticipantI’ve got the PRO version
September 30, 2020 at 1:53 pm #19484nmediaKeymasterHi Cube,
let me see this issue and get back to you. Thanks for sharing the log.
October 7, 2020 at 7:32 am #19620CubeParticipantHave you got a solution for my issue ? Can i disabled the mpdf library, i didn’t need it..
October 8, 2020 at 4:21 am #19645nmediaKeymasterHi Cube,
can you please try with CFOM PRO latest version, we have checked again in our test server and PDF is generated without any issue in orders. Here is a video I created for this: https://www.awesomescreenshot.com/video/1275784?key=2410bd5e006d5460bc63252e6024b898
October 8, 2020 at 7:31 am #19651CubeParticipantI’ve got the version 17.0 for both extension (N-Media WooCommerce Checkout Fields & PRO)
How could i comment or remove this part ? it make crash the website order process, no email are sending… and a 500 error is display after ordering..
I repeat i don’t need this feature (PDF).October 8, 2020 at 8:47 am #19653CubeParticipantOk so i’ve commented these lines :
// mpdf load // if (cfom_pro_is_installed()) { // $pdf_dir_path = cfom_get_dir_path('pdf_dir'); // self::$mpdf = new \Mpdf\Mpdf([ // 'tempDir' => $pdf_dir_path, // 'margin_left' => 1, // 'margin_right' => 1, // 'setAutoTopMargin'=> 'stretch', // 'autoMarginPadding' => 0, // 'setAutoBottomMargin'=> 'stretch', // 'margin_bottom' => 0, // 'margin_header' => 0.4, // 'margin_footer' => 0.4, // ]); // }
And these lines 175 -> 182
// self::$mpdf->SetDefaultBodyCSS('color', '#880000'); // self::$mpdf->SetHTMLHeader( $this->pdf_header() ); // self::$mpdf->SetHTMLFooter( $this->pdf_footer() ); // self::$mpdf->WriteHTML($stylesheet, 1); // self::$mpdf->WriteHTML($html, 2); // self::$mpdf->Output();
And it work as a charm
For your next version you could add a checkbox in settings to disable the pdf export.October 9, 2020 at 11:30 am #19687nmediaKeymasterHi Cube,
Thanks for this we will fix it in the next version.
Cheers.
-
AuthorPosts
- You must be logged in to reply to this topic.