Support Forum
When I go to my custom post type, it shows an error message: "There has been a critical error on this website. Please check your site admin email inbox for instructions."
I got an email from wordpress with the logs:
"Error Details
=============
An error of type E_ERROR was caused in line 81 of the file /www/gritscouts_146/public/wp-content/plugins/meta-box/inc/fields/choice.php. Error message: Uncaught TypeError: Illegal offset type in isset or empty in /www/gritscouts_146/public/wp-content/plugins/meta-box/inc/fields/choice.php:81
Stack trace:
#0 /www/gritscouts_146/public/wp-content/plugins/meta-box/inc/field.php(580): RWMB_Choice_Field::format_single_value(Array, Array, Array, 4645)
#1 /www/gritscouts_146/public/wp-content/plugins/meta-box/inc/field.php(528): RWMB_Field::call('format_single_v...', Array, Array, Array, 4645)
#2 /www/gritscouts_146/public/wp-content/plugins/meta-box/inc/field.php(580): RWMB_Field::format_clone_value(Array, Array, Array, 4645)
#3 /www/gritscouts_146/public/wp-content/plugins/meta-box/inc/field.php(506): RWMB_Field::call('format_clone_va...', Array, Array, Array, 4645)
#4 /www/gritscouts_146/public/wp-content/plugins/meta-box/inc/field.php(580): RWMB_Field::format_value(Array, Array, Array, 4645)
#5 /www/gritscouts_146/public/wp-content/plugins/meta-box/inc/field.php(491): RWMB_Field::call('format_value', Array, Array, Array, 4645)
#6 /www/gritscouts_146/public/wp-content/plugins/meta-box/inc/field.php(580): RWMB_Field::the_value(Array, Array, 4645)
#7 /www/gritscouts_146/public/wp-content/plugins/meta-box/inc/functions.php(190): RWMB_Field::call('the_value', Array, Array, 4645)
#8 /www/gritscouts_146/public/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-admin-columns/src/Post.php(62): rwmb_the_value('job_status', Array, 4645, false)
#9 /www/gritscouts_146/public/wp-includes/class-wp-hook.php(308): MBAC\Post->show('job_status', 4645)
#10 /www/gritscouts_146/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#11 /www/gritscouts_146/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#12 /www/gritscouts_146/public/wp-admin/includes/class-wp-posts-list-table.php(1369): do_action('manage_job_post...', 'job_status', 4645)
#13 /www/gritscouts_146/public/wp-admin/includes/class-wp-list-table.php(1559): WP_Posts_List_Table->column_default(Object(WP_Post), 'job_status')
#14 /www/gritscouts_146/public/wp-admin/includes/class-wp-posts-list-table.php(1403): WP_List_Table->single_row_columns(Object(WP_Post))
#15 /www/gritscouts_146/public/wp-admin/includes/class-wp-posts-list-table.php(813): WP_Posts_List_Table->single_row(Object(WP_Post), 0)
#16 /www/gritscouts_146/public/wp-admin/includes/class-wp-posts-list-table.php(789): WP_Posts_List_Table->_display_rows(Array, 0)
#17 /www/gritscouts_146/public/wp-admin/includes/class-wp-list-table.php(1471): WP_Posts_List_Table->display_rows()
#18 /www/gritscouts_146/public/wp-admin/includes/class-wp-list-table.php(1398): WP_List_Table->display_rows_or_placeholder()
#19 /www/gritscouts_146/public/wp-admin/edit.php(487): WP_List_Table->display()
#20 {main}
thrown"
I've also tried to:
1) Disable all plugins
2) Update Metabox to the latest version
Hello Mark,
Can you please generate the PHP code of the field group assigned to that CPT or you can export the field group to a JSON file and share it here?
There could be an issue with the options of a select field.
Hello,
I import the shared JSON file to my local host, assign it to a post type, create a new post and add some value to the custom fields but do not see any issue.
You can try to delete some choice fields in the field group on your site like checkbox, radio, taxonomy ... and check this issue again.