• Hi,

    So we’re having repeated problems using your plugin.

    Essentially clicking the “Print Invoice” button within the Order CMS is presenting the user with a print window showing a 502 Bad gateway error.

    Our error logs are below:

    2021/01/13 15:04:13 [error] 31480#31480: *4312826 FastCGI sent in stderr: “PHP message: id was called incorrectly. Order properties should not be accessed directly. Backtrace: do_action(‘wp_ajax_print_order’), WP_Hook->do_action, WP_Hook->apply_filters, WCDN_Print->template_redirect_admin, WCDN_Print->generate_template, wc_get_template, include(‘/plugins/woocommerce-delivery-notes/templates/print-order/print-order.php’), do_action(‘wcdn_loop_content’), WP_Hook->do_action, WP_Hook->apply_filters, wcdn_content, wcdn_get_template_content, wc_get_template, include(‘/plugins/woocommerce-delivery-notes/templates/print-order/print-content.php’), apply_filters(‘wcdn_order_info_fields’), WP_Hook->apply_filters, add_custom_fields_to_invoice, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
    PHP message: id was called incorrectly. Order properties should not be accessed directly. Backtrace: do_action(‘wp_ajax_print_order’), WP_Hook->do_action, WP_Hook->apply_filters, WCDN_Print->template_redirect_admin, WCDN_Print->generate_template, wc_get_template, include(‘/plugins/woocommerce-delivery-notes/templates/print-order/print-order.php’), do_action(‘wcdn_loop_content’), WP_Hook->do_action, WP_Hook->apply_filters, wcdn_content, wcdn_get_template_content, wc_get_template, include(‘/plugins/woocommerce-delivery-notes/templates/print-order/print-content.php’), apply_filters(‘wcdn_order_info_fields’), WP_Hook->apply_filters, add_custom_fields_to_invoice, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
    PHP message: id was called incorrectly. Order properties should not be accessed directly. Backtrace: do_action(‘wp_ajax_print_order’), WP_Hook->do_action, WP_Hook->apply_filters, WCDN_Print->template_redirect_admin, WCDN_Print->generate_template, wc_get_template, include(‘/plugins/woocommerce-delivery-notes/templates/print-order/print-order.php’), do_action(‘wcdn_loop_content’), WP_Hook->do_action, WP_Hook->apply_filters, wcdn_content, wcdn_get_templat

    This seems to be an issue with the plugin files and using incorrect / deprecated methods.

    We’re using the most recent version of the plugin available to us which is 4.6.2.

    Wordpress version 5.6.

    Do you have any plans to resolve these issues? The plugin is currently unusable.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @klivie,

    Could you please let us know where exactly have you clicked on the print invoice button that showed the 502 error? It would be great if you can share the screenshots of the same so that we can try once on our site.

    Regards,
    Kenil Shah

    Any progress with this?

    It’s been playing up for us all week and we’ve finally deactivated today to try finding a better solution as we literally can’t print a thing now.

    Any help would be much appreciated.

    Thread Starter klivie

    (@klivie)

    See an image of the error screen we’re given here:

    https://ibb.co/DgjxwFL

    This is when we click the normal “Print Invoice” button in the Edit Order Screen

    It seems to be very tempermental, I actually tested it this morning and it worked without any issue.

    But this is now the third time we’ve had the issue and are losing patience with the plugin repeatedly breaking.

    Same here, following this for updates.

    I think it’s having to do with the PHP version. I moved that server from 7.0 to 7.4 today which caused the errors to start. Reverting to 7.0 fixed it. I’m guessing PHP 7.4 has changed enough so that this code breaks.

    I’ll keep it at 7.0 for the near term.

    Hi @klivie,

    I have tried to replicate your issue on our staging site but I am unable to replicate it. To me, no error is shown when we click on the print invoice from the edit order page.

    However, I have checked with the latest version of the plugin, WooCommerce, WordPress version 5.6 and PHP version 7.2.34.

    So, could you please let us know which PHP version are you using on your site?

    Regards,
    Kenil Shah

    Thread Starter klivie

    (@klivie)

    Hi @kenil802

    We’re using PHP version 7.2.

    Wordpress Version 5.6
    Woocommerce Version 4.9.1
    Plugin version 5.6.2

    Surely the fact 2 other users have mentioned they are tracking this same issue means it’s likely there’s errors somewhere within the plugin?

    Could it be a problem alongside using nginx?

    Like i said previously the errors seem to be intermittent weirdly. I just did another test and it seems to be working fine at the mo. Are you using any kind of external sources which could have gone through some downtime?

    We’ve had issues on 3 occasions now and if the plugin continues to have regular problems we may have to look at alternatives as the client is fed up of continued problems.

    Thanks

    I would just like to butt in here. I had a similar problem and finally tracked it down last night to a template that I customized. Did you customize the templates and place the templates in your wp-content->themes->woocommerce->print-order file? If so, you may need to update them.

    Please see my post here
    https://wordpress.org/support/topic/image-on-invoice-if-product-and-image-later-deleted-critical-error/

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

The topic ‘502 error returned when printing invoice’ is closed to new replies.