I just updated my AIO and now when editing an existing post via MB Frontend Submission, the post_title and post_content fields no longer populate with the existing data. It worked fine before the update. I have to use custom meta boxes, instead of the "post_fields" attribute in the shortcode, because I need more control over headings and placement on the form.
Additionally, the thumbnail upload only works when using "post_fields". I can't get it to work when using a defined meta box.
Here is my code:
$meta_boxes = array ( 'title' => 'Event Name', 'id' => 'event-title', 'fields' => array( array ( 'id' => 'heading_title', 'type' => 'heading', 'desc' => 'What is the name of your event?', 'name' => 'Event Name', ), array( 'name' => 'Event Name', 'id' => 'post_title', 'type' => 'text', 'required' => true, ), ), ); $meta_boxes = array ( 'title' => 'Event Description', 'id' => 'event-desc', 'fields' => array( array ( 'id' => 'heading_desc', 'type' => 'heading', 'desc' => 'Please provide some information about this event. The more detailed, the better.', 'name' => 'Event Description', ), array( 'name' => 'Event Description', 'id' => 'post_content', 'type' => 'wysiwyg', 'raw' => false, // Editor settings 'options' => array( 'textarea_rows' => 20, 'teeny' => true, ), 'required' => true, ), ), ); $meta_boxes = array ( 'title' => 'Cover Image', 'id' => 'event-cover', 'fields' => array( array ( 'id' => 'heading_title', 'type' => 'heading', 'desc' => 'The cover image is the large photo that appears at the top of your listing. For the best results, use an image measuring 1920x823 pixels (21:9 aspect ratio). The cover image is optional.', 'name' => 'Cover Image', ), array( 'type' => current_user_can( 'upload_files' ) ? 'single_image' : 'image', 'name' => 'Cover Image', 'id' => '_thumbnail_id', 'max_file_uploads' => 1, 'force_delete' => true, ), ), );
Thank you for getting in touch.
I've tried to run your code on my local site but do not see any issue with the field post_title, post_content. It populates the existing post data when editing from Frontend Dashboard as well.
Can you please share some screenshots or a screen record of your screen? You can also follow the Debugging Information step to troubleshoot this issue https://support.metabox.io/topic/how-to-create-a-new-topic/.
Thanks for getting back to me. I updated the record I was working with from a different place and now the post_title and post_content are working fine. Not sure what the issue was, but it's working now.
The thumbnail is the only thing that still isn't working, though. Again, if I use post_fields in the shortcode, the thumbnail works. As a regular meta box, it doesn't work. Unfortunately, I have to use a regular meta box because I need the thumbnail upload/select to be at the bottom of the form and include a heading and description.
Ah, nevermind. I figured it out. I didn't include 'post_types'. As long as 'post_types' is defined on every meta box, everything works fine.
Thanks for your help.