Open gfrino opened 11 months ago
I use PHP 8.2
The first thing you can try, is to go to the Cloudprint plugin settings. If Selected printer is empty, click on Edit, copy the mac address and rename the printer with that. I had this problem and that solved it. Assuming that, like me, it was working for you before.
this plugin is very buggy, when StarMicronics will fix it? I keep buying their printers because of this plugin...
I did what you say but when I try to re-print an order I still get: Fatal error: Uncaught TypeError: html_entity_decode(): Argument https://github.com/star-micronics/star-cloudprnt-for-woocommerce/pull/1 ($string) must be of type string, array given in /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php:120 Stack trace: #0 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php(120): html_entity_decode() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/pull/1 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php(158): star_cloudprnt_filter_html() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/pull/2 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php(384): star_cloudprnt_print_additional_order_info() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/pull/3 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php(194): star_cloudprnt_print_order_summary() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/pull/4 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php(209): star_cloudprnt_trigger_print() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/issues/5 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(324): star_cloudprnt_reprint() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/pull/6 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/pull/7 /var/www/webroot/ROOT/wp-includes/plugin.php(517): WP_Hook->do_action() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/issues/8 /var/www/webroot/ROOT/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php(173): do_action() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/pull/9 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(324): WC_Meta_Box_Order_Actions::save() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/issues/10 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/discussions/11 /var/www/webroot/ROOT/wp-includes/plugin.php(517): WP_Hook->do_action() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/pull/12 /var/www/webroot/ROOT/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-meta-boxes.php(263): do_action() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/issues/13 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(326): WC_Admin_Meta_Boxes->save_meta_boxes() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/issues/14 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/issues/15 /var/www/webroot/ROOT/wp-includes/plugin.php(517): WP_Hook->do_action() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/issues/16 /var/www/webroot/ROOT/wp-includes/post.php(4760): do_action() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/issues/17 /var/www/webroot/ROOT/wp-includes/post.php(4862): wp_insert_post() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/issues/18 /var/www/webroot/ROOT/wp-admin/includes/post.php(453): wp_update_post() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/issues/19 /var/www/webroot/ROOT/wp-admin/post.php(227): edit_post() https://github.com/star-micronics/star-cloudprnt-for-woocommerce/issues/20 {main} thrown in /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php on line 120
Version 2.0.3 Printer Information Name: 00:11:62:41:9F:99 - Rename Poll Interval: 5 Connectivity: Connected ASB Status Code: 29 a 6 0 0 0 0 20 0 0 0 HTTP Status Code: 200 OK Last Communication: Sat 27 Jan 24 - 12:20:16 Printer Identification MAC Address: 00:11:62:1E:FF:AD IP Address: 213.3.44.117 Interface Client Type: Star mC-Print3 Client Version: 3.4 Supported Encodings application/vnd.star.starprnt application/vnd.star.starprntcore text/plain image/vnd.star.png image/png application/octet-stream Printer Queue No items found in printer queue. Printed Order History No printed previous orders have been logged. Delete Printer
In order to fix the problem our developer changed the following:
// Format a float value as a currency string function star_cloudprnt_format_currency (Svalue) if (lempty ($value) ) ( return star_cloudpint_get_codepage_currency_symbol() • number_format (§value, 2, '', ''); }else( return star_cloudprnt_get_codepage_currency_symbol () . ' 0.00' ;
fatal error is coming because here $value is coming null
star-cloudprnt-for-woocommerce.zip
this is the fixed plugin
new fatal error:
Fatal error: Uncaught TypeError: html_entity_decode(): Argument #1 ($string) must be of type string, array given in /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php:118 Stack trace: #0 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php(118): html_entity_decode() #1 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php(158): star_cloudprnt_filter_html() #2 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php(384): star_cloudprnt_print_additional_order_info() #3 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php(192): star_cloudprnt_print_order_summary() #4 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php(207): star_cloudprnt_trigger_print() #5 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(324): star_cloudprnt_reprint() #6 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #7 /var/www/webroot/ROOT/wp-includes/plugin.php(517): WP_Hook->do_action() #8 /var/www/webroot/ROOT/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php(173): do_action() #9 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(324): WC_Meta_Box_Order_Actions::save() #10 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #11 /var/www/webroot/ROOT/wp-includes/plugin.php(517): WP_Hook->do_action() #12 /var/www/webroot/ROOT/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-meta-boxes.php(263): do_action() #13 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(326): WC_Admin_Meta_Boxes->save_meta_boxes() #14 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #15 /var/www/webroot/ROOT/wp-includes/plugin.php(517): WP_Hook->do_action() #16 /var/www/webroot/ROOT/wp-includes/post.php(4760): do_action() #17 /var/www/webroot/ROOT/wp-includes/post.php(4862): wp_insert_post() #18 /var/www/webroot/ROOT/wp-admin/includes/post.php(453): wp_update_post() #19 /var/www/webroot/ROOT/wp-admin/post.php(227): edit_post() #20 {main} thrown in /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php on line 118
106 // Convert html data to printer ready text. Note that this preserves no formatting, all tags are stripped 107 // and newlines removed, it is intended for printing field names/values. 108 function star_cloudprnt_filter_html ($data) 109 { 110 / Filter known html key words, convert to printer appropriate commands and encoding / 111 112 Sencoding = get_option( 'star-cloudprnt-printer-encoding-select' ) ; 113 114 $phpenc = "UTF-8" ; 115 if($encoding === "1252" ) 116 $phpenc = "cp1252" ; 117 118 $data = html _entity_decode (§data, ENT_QUOTES, "UTF-8" ) ; 119 120 if ($phpenc !== "UFT-8" ) 121 $data = mo_convert_encoding ($data, $phpenc, "UTF-8" ); 122 123 sdata = str_replacelarray("lr, "/n"),"', sdata); // Strip newlines 124 125 return strip_tags ($data); 126
@gfrino can you share if you were able to fix this plugin many people depend on this and seems like there is a lot of issues never addressed, if your is working please share it with the community, thanks in advance!
It says connected but is not printed. I then installed the latest version from GitHub but sill doesn't print. When trying to print the order from Wordpress I get this error
Warning: opendir(/var/www/webroot/ROOT/wp-content/star-cloudprnt/printerdata//queue/): Failed to open directory: No such file or directory in /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_queue.inc.php on line 9
Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer.inc.php on line 29
Warning: copy(/var/www/webroot/ROOT/wp-content/star-cloudprnt/printerdata//queue/1.txt): Failed to open stream: No such file or directory in /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_queue.inc.php on line 98
Warning: fopen(/var/www/webroot/ROOT/wp-content/star-cloudprnt/printerdata//queue/1): Failed to open stream: No such file or directory in /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_queue.inc.php on line 99
Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool given in /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_queue.inc.php:100 Stack trace: #0 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_queue.inc.php(100): fwrite() #1 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_text_plain.inc.php(127): star_cloudprnt_queue_add_print_job() #2 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php(401): Star_CloudPRNT_Text_Plain_Job->printjob() #3 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php(192): star_cloudprnt_print_order_summary() #4 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php(207): star_cloudprnt_trigger_print() #5 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(324): star_cloudprnt_reprint() #6 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #7 /var/www/webroot/ROOT/wp-includes/plugin.php(517): WP_Hook->do_action() #8 /var/www/webroot/ROOT/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php(173): do_action() #9 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(324): WC_Meta_Box_Order_Actions::save() #10 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #11 /var/www/webroot/ROOT/wp-includes/plugin.php(517): WP_Hook->do_action() #12 /var/www/webroot/ROOT/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-meta-boxes.php(263): do_action() #13 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(326): WC_Admin_Meta_Boxes->save_meta_boxes() #14 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #15 /var/www/webroot/ROOT/wp-includes/plugin.php(517): WP_Hook->do_action() #16 /var/www/webroot/ROOT/wp-includes/post.php(4760): do_action() #17 /var/www/webroot/ROOT/wp-includes/post.php(4862): wp_insert_post() #18 /var/www/webroot/ROOT/wp-admin/includes/post.php(453): wp_update_post() #19 /var/www/webroot/ROOT/wp-admin/post.php(227): edit_post() #20 {main} thrown in /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/cloudprnt/printer_queue.inc.php on line 100