Conversation
supportI am trying to use your plugin but after I select something and click on search button, I got 500 Internal Server Error. I've enabled debug and I saw this on the debug log. [03-Jun-2023 01:45:29 UTC] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /home/deffocom/public_html/test/wp-content/plugins/pw-bulk-edit/includes/columns.php:38 Stack trace: 0 /home/deffocom/public_html/test/wp-content/plugins/pw-bulk-edit/includes/sql-builder.php(59): PWBE_Columns::get_by_field('post_title') 1 /home/deffocom/public_html/test/wp-content/plugins/pw-bulk-edit/ui/results.php(32): PWBE_SQL_Builder->get_products(Array) 2 /home/deffocom/public_html/test/wp-content/plugins/pw-bulk-edit/pw-bulk-edit.php(172): require('/home/deffocom/…') 3 /home/deffocom/public_html/test/wp-includes/class-wp-hook.php(307): PW_Bulk_Edit->ajax_filter_results('') 4 /home/deffocom/public_html/test/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) 5 /home/deffocom/public_html/test/wp-includes/plugin.php(476): WP_Hook->do_action(Array) 6 /home/deffocom/public_html/test/wp-admin/admin-ajax.php(187): do_action('wp_ajax_pwbe_fi…') 7 {main} thrown in /home/deffocom/public_html/test/wp-content/plugins/pw-bulk-edit/includes/columns.php on line 38 The page I need help with: [ log in to see the link]
This error can occur if the object in the product_columsn is not an array. Your stacktrace indicates it is a string value and not an array. Have you used the “pwbe_product_columns” hook on your site? If so, ensure that you are adding array() objects and not strings.
We released a new version of the plugin that will sanitize the product columns to help ensure only well formatted data is returned from the pwbe_product_columns hook. Let me know if you receive any new errors after upgrading.
Thanks for your answer. I didn’t use the “pwbe_product_columns” hook on my site. I’ve tested the new version and works good.
This error can occur if the object in the product_columsn is not an array. Your stacktrace indicates it is a string value and not an array. Have you used the “pwbe_product_columns” hook on your site? If so, ensure that you are adding array() objects and not strings.
We released a new version of the plugin that will sanitize the product columns to help ensure only well formatted data is returned from the pwbe_product_columns hook. Let me know if you receive any new errors after upgrading.
Thanks for your answer. I didn’t use the “pwbe_product_columns” hook on my site. I’ve tested the new version and works good.