mcguffin/acf-quickedit-fields

Invalid Post type error when bulk editing

Closed this issue · 2 comments

We are trying to move our post tags to new CPT using ACF. We installed the plugin and it seems to work on an individual post level in the main All Post page.

However, when we got to a tag and filter by that tag so you get a URL like /wp-admin/edit.php?tag=[name] again when quick editing a post it works great. When we try to bulk edit we get a gray screen of death and it says "Invalid Post Type"

Any ideas how to fix this issue?

image

image

Updated on the issue:

I noticed in the URL that post_type=all instead of the post type name, post_type=[post-type-name]. I updated the URL and then got this critical error:

Error Details
=============
An error of type E_ERROR was caused in line 42 of the file /public/wp-content/plugins/acf-quickedit-fields/include/ACFQuickEdit/Fields/Traits/BulkOperationLists.php. Error message: Uncaught TypeError: array_values(): Argument #1 ($array) must be of type array, null given in /public/wp-content/plugins/acf-quickedit-fields/include/ACFQuickEdit/Fields/Traits/BulkOperationLists.php:42
Stack trace:
#0 /public/wp-content/plugins/acf-quickedit-fields/include/ACFQuickEdit/Fields/Traits/BulkOperationLists.php(42): array_values(NULL)
#1 /public/wp-content/plugins/acf-quickedit-fields/include/ACFQuickEdit/Admin/Bulkedit.php(211): ACFQuickEdit\Fields\PostObjectField->do_bulk_operation('intersection', Array, 50641)
#2 [internal function]: ACFQuickEdit\Admin\Bulkedit->process_data(Array, 'field_64988dbff...', 50641)
#3 /public/wp-content/plugins/acf-quickedit-fields/include/ACFQuickEdit/Admin/Bulkedit.php(202): array_walk(Array, Array, 50641)
#4 /public/wp-content/plugins/acf-quickedit-fields/include/ACFQuickEdit/Admin/Bulkedit.php(188): ACFQuickEdit\Admin\Bulkedit->process_data(Array, NULL, 50641)
#5 /public/wp-content/plugins/acf-quickedit-fields/include/ACFQuickEdit/Admin/EditFeature.php(171): ACFQuickEdit\Admin\Bulkedit->get_save_data(50641)
#6 /public/wp-includes/class-wp-hook.php(310): ACFQuickEdit\Admin\EditFeature->save_acf_post_meta(50641)
#7 /public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(50641, Array)
#8 /public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#9 /public/wp-includes/post.php(4717): do_action('save_post', 50641, Object(WP_Post), true)
#10 /public/wp-includes/post.php(4819): wp_insert_post(Array, false, true)
#11 /public/wp-admin/includes/post.php(653): wp_update_post(Array)
#12 /public/wp-admin/edit.php(194): bulk_edit_posts(Array)
/#13 {main}
  thrown

fixed in 95b8404