Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
alex7

Order export failed (error 500)

Hello,

I tried to export an order list but get an error 500. Here is what I get in the console:

GET https://website.com/wp-admin/edit.php?ac-actions-form=1&orderby=date&order=desc&s&post_status=wc-completed&post_type=shop_order&m=0&layout=5e8d72fc7b9c1&_customer_user&acp_filter-min%5Border_date%5D=2022-12-12&acp_filter-max%5Border_date%5D=2022-12-18&shop_order_subtype&filter_action=Filtrer&action=-1&paged=1&action2=-1&_wpnonce=5554cead94&acp_export_action=acp_export_listscreen_export&acp_export_counter=0&acp_export_ids=&acp_export_columns=order_status,order_number,5b56e5dd7946f,5aae1b075d29f,order_date,59819ebeaa6fd,61b354b9f6872c,subscription_relationship,order_total,59e0731406c30,billing_address 500
(anonyme) @ listscreen.js:1
e.exports @ listscreen.js:1
e.exports @ listscreen.js:1
d.request @ listscreen.js:1
r.forEach.d.<computed> @ listscreen.js:1
(anonyme) @ listscreen.js:1
(anonyme) @ listscreen.js:1
startThread @ listscreen.js:1
start @ listscreen.js:1
(anonyme) @ listscreen.js:1
(anonyme) @ listscreen.js:1

Thanks for your help.

1 month, 2 weeks ago
Stefan
Developer

Thanks for your feedback.
Since you have a 500 error, can you have a look at your error.log file and send me the specific log for this error to support@admincolumns.com so I can help you further?

1 month, 2 weeks ago
alex7

Hello Stefan,

Here is what shows up:

[20-Dec-2022 10:28:53 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_id() on bool in /home/marmite/public_html/website.com/wp-content/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:352
Stack trace:
#0 /home/marmite/public_html/website.com/wp-content/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php(427): wcs_order_contains_subscription()
#1 /home/marmite/public_html/website.com/wp-includes/class-wp-hook.php(310): WC_Subscriptions_Order::add_contains_subscription_column_content()
#2 /home/marmite/public_html/website.com/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#3 /home/marmite/public_html/website.com/wp-includes/plugin.php(517): WP_Hook->do_action()
#4 /home/marmite/public_html/website.com/wp-admin/includes/class-wp-posts-list-table.php(1363): do_action()
#5 /home/marmite/public_html/website.com/wp-content/plugins/admin-columns-pro/admin-columns/classes/ListTable/Post.php(24): WP_Posts_List_Table->column_default()
#6 /home/marmite/public_html/website.com/wp-content/plugins/admin-columns-pro/classes/Export/Strategy.php(231): AC\ListTable\Post->get_column_value()
#7 /home/marmite/public_html/website.com/wp-content/plugins/admin-columns-pro/classes/Export/Strategy.php(329): ACP\Export\Strategy->get_rows()
#8 /home/marmite/public_html/website.com/wp-content/plugins/admin-columns-pro/classes/Export/Strategy/Post.php(73): ACP\Export\Strategy->export()
#9 /home/marmite/public_html/website.com/wp-includes/class-wp-hook.php(308): ACP\Export\Strategy\Post->catch_posts()
#10 /home/marmite/public_html/website.com/wp-includes/plugin.php(256): WP_Hook->apply_filters()
#11 /home/marmite/public_html/website.com/wp-includes/class-wp-query.php(3466): apply_filters_ref_array()
#12 /home/marmite/public_html/website.com/wp-includes/class-wp-query.php(3749): WP_Query->get_posts()
#13 /home/marmite/public_html/website.com/wp-includes/class-wp.php(663): WP_Query->query()
#14 /home/marmite/public_html/website.com/wp-includes/class-wp.php(783): WP->query_posts()
#15 /home/marmite/public_html/website.com/wp-includes/functions.php(1332): WP->main()
#16 /home/marmite/public_html/website.com/wp-admin/includes/post.php(1245): wp()
#17 /home/marmite/public_html/website.com/wp-admin/includes/class-wp-posts-list-table.php(165): wp_edit_posts_query()
#18 /home/marmite/public_html/website.com/wp-admin/edit.php(235): WP_Posts_List_Table->prepare_items()
#19 {main}
  thrown in /home/marmite/public_html/website.com/wp-content/plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php on line 352

FYI, I’m running the last version of Woo Subscriptions (4.7.0) and WooCommerce (7.2.1)

Thanks

1 month, 2 weeks ago
Stefan
Developer

Can you send me a screenshot or an export of your order columns so I can try to reproduce the issue?
Based on the error, it is probably related to a WooCommerce subscription column.
Do you have any custom subscription columns?
Data can be sent to support@admincolumns.com

1 month, 2 weeks ago
alex7

I can’t export orders because of the 500 error :)

But yes, I have a Subscription relationship column. When I remove this column from the order screen, I can export data.

Let me know if you need more info.

1 month, 2 weeks ago
Stefan
Developer

Sorry, I meant an export of the column settings (tools tab on our settings page).
But it is good to know that the Subscription relationship column gives the error.
Unfortunately, I don’t have an issue with that specific column.
Can you tell me what version of WooCommerce, Subscriptions and our plugin you’re running?

1 month, 2 weeks ago
Stefan
Developer

Thanks, unfortunately even with your exported column set, I’m not able to reproduce the issue.
When I look at the codebase of subscriptions where the issue occurs, it looks like the method ->get_id() is called on $order which is null in your case. But based on the checks above the method, this could not happen unless you try to export a non-WooCommerce order.

Are you able to debug this part on your website, since I don’t know how I can trigger this error.

1 month, 2 weeks ago
alex7

I’ll take a look with my team and will let you know. :)

1 month, 2 weeks ago

You must be logged in to reply to this topic.