Error when trying to print invoice
-
Hi Ewout,
I notice you marked my last post as resolved, but unfortunately I am still getting fatal error message when I try to print an invoice. You mentioned I require Ctype extension to be added to my php.
I have been onto my webhost and they have installed Ctype extension on the server. If I check the php file on my server I can see the Ctype extension code, but I am still getting the same fatal error. I have cleared cache etc, but the error persists. Anything else I can do from my end?Thanks
Geoff
PS the php code on my server reads…
PHP 7.4: cType()
; Local Variables:
; tab-width: 4
; End:
extension=propro.so
extension=raphf.so
extension=ctype.so
-
Is it still the same error you are getting? This is the one you reported earlier:
Fatal error: Call to undefined function Dompdf\Css\ctype_xdigit()
That particular function is a default component of Ctype:
https://www.php.net/manual/en/function.ctype-xdigit.php(the error shows it within the
Dompdf\Css
namespace but PHP always checks both the root namespace and the context namespace)I see you had the same issue a while back! https://wordpress.org/support/topic/errors-after-upgrade-php-to-7-4-10/
(yet with a slightly different function from the same collection:ctype_digit
)
I think the solution should be the same.Hi Ewout, Yes I had a similar issue back before Christmas.
I am a bit confused, my webhost says that the Ctype extension has been installed, as I posted a snippet from my php file. What do I need to ask the to get this to work. I am not too technically minded, so any suggestion as what I need to do is appreciated.Thanks
GeoffFatal error: Call to undefined function Dompdf\Css\ctype_xdigit()
#0 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Css/Color.php(197): Dompdf\Css\Color::getArray(‘0000FF’)
#1 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Css/Style.php(817): Dompdf\Css\Color::parse(‘blue’)
#2 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Css/Style.php(1849): Dompdf\Css\Style->munge_color(‘blue’)
#3 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Css/Style.php(1717): Dompdf\Css\Style->set_prop_color(‘border_top_colo…’, ‘blue’)
#4 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Css/Style.php(1735): Dompdf\Css\Style->_set_style_side_type(‘border’, ‘top’, ‘color’, ‘blue’, false)
#5 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Css/Style.php(1754): Dompdf\Css\Style->_set_style_sides_type(‘border’, ‘blue’, ‘blue’, ‘blue’, ‘blue’, ‘color’, false)
#6 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Css/Style.php(1775): Dompdf\Css\Style->_set_style_type(‘border’, ‘color’, ‘blue’, false)
#7 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Css/Style.php(2665): Dompdf\Css\Style->_set_style_type_important(‘border’, ‘color’, ‘blue’)
#8 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Css/Style.php(894): Dompdf\Css\Style->set_border_color(‘blue’)
#9 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Css/Stylesheet.php(1638): Dompdf\Css\Style->__set(‘border_color’, ‘blue’)
#10 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Css/Stylesheet.php(1671): Dompdf\Css\Stylesheet->_parse_properties(‘display: block;…’)
#11 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Css/Stylesheet.php(1415): Dompdf\Css\Stylesheet->_parse_sections(‘blockquote[type…’)
#12 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Css/Stylesheet.php(420): Dompdf\Css\Stylesheet->_parse_css(‘/**\r\n * dompdf …’)
#13 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Dompdf.php(599): Dompdf\Css\Stylesheet->load_css_file(‘/hermes/bosnacw…’, 1)
#14 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Dompdf.php(761): Dompdf\Dompdf->processHtml()
#15 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-pdf-maker.php(54): Dompdf\Dompdf->render()
#16 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(712): WPO\WC\PDF_Invoices\PDF_Maker->output()
#17 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(747): WPO\WC\PDF_Invoices\Documents\Order_Document->get_pdf()
#18 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-main.php(360): WPO\WC\PDF_Invoices\Documents\Order_Document->output_pdf(‘inline’)
#19 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-includes/class-wp-hook.php(287): WPO\WC\PDF_Invoices\Main->generate_pdf_ajax(”)
#20 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array)
#21 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
#22 /hermes/bosnacweb05/bosnacweb05ag/b2831/nf.thenuthouse1/public_html/wp-admin/admin-ajax.php(184): do_action(‘wp_ajax_generat…’)
#23 {main}The solution should be the same as last time when you wrote this:
It appears the php version does not have that ctype_digit function, and the technicians are now working on it.
Yet this time it’s a slightly different function,
ctype_xdigit
instead ofctype_digit
.It’s a bit puzzling to me why a specific function is missing, as these usually come in a single bundle. But maybe your host compiles their own PHP versions?
Ok, thanks for that, I will go back to webshost to work out whats going on. I use webchat with them so often it is hard to get the problem across.
I will let you a bit later on (I have an appointment I need to attend) how I went with them. Thanks for your assistance.Thanks
GeoffHi Ewout,
It’s amazing what happens when I get a different Tech at my webshost. I didn’t even have to explain to this guy, he just went and fix it, now working fine.
Again, thanks for your time & assistance.Regards
Geoff
- The topic ‘Error when trying to print invoice’ is closed to new replies.