Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't print #29

Open
gfrino opened this issue Dec 17, 2023 · 11 comments
Open

Doesn't print #29

gfrino opened this issue Dec 17, 2023 · 11 comments

Comments

@gfrino
Copy link

gfrino commented Dec 17, 2023

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

@gfrino
Copy link
Author

gfrino commented Dec 17, 2023

I use PHP 8.2

@agenceKanvas
Copy link

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.

@gfrino
Copy link
Author

gfrino commented Jan 27, 2024

this plugin is very buggy, when StarMicronics will fix it? I keep buying their printers because of this plugin...

@gfrino
Copy link
Author

gfrino commented Jan 27, 2024

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 #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() #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(194): star_cloudprnt_print_order_summary() #4 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php(209): 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 120

@gfrino
Copy link
Author

gfrino commented Jan 27, 2024

Registrazione.schermo.2024-01-27.alle.12.25.50.mov

@gfrino
Copy link
Author

gfrino commented Jan 27, 2024

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

  • You cannot delete the printer whilst it is connected
    Return to previous page

@gfrino
Copy link
Author

gfrino commented Jan 28, 2024

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

@gfrino
Copy link
Author

gfrino commented Jan 28, 2024

star-cloudprnt-for-woocommerce.zip

this is the fixed plugin

@gfrino
Copy link
Author

gfrino commented Jan 30, 2024

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

@Chlitzxer
Copy link

@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!

@SilverCode87
Copy link

We had similar issue today. Not sure if the issue was related to this action, but it started to work after the following:

I have checked the tick box in star cloud print settings for "Print additional order meta-data, such as custom fields.". After that the order went through and the receipt came out. I also tried to check that box off and the system continued to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants