Tagged: custom_post_type, not saving
- This topic has 3 replies, 2 voices, and was last updated 6 years, 3 months ago by
Steve.
-
AuthorPosts
-
-
November 3, 2015 at 12:02 pm #4846
justinMemberWhen I create a new post in my custom post type, it does not save any of the data except for the post title. I have to then completely go to all of that post type, and re-enter the post in order to update any of my meta-boxes. After the 1st update, I can not update a second time until I have gone back to all posts and re-entered that particular post.
I think it has something to do with my workflow, but I can’t figure out what. I think it is related to workflow, because the order of my meta-boxes are not working. The order it does is 20,30,10. Where my Order:10 metabox is at the bottom.
This is the metafile that represents 10.
<?php /* Title: General Trip Information Post Type: post_mission_trip Order: 10 Flow: Trip Flow Tab: General */ piklist('field', array( 'type' => 'text' ,'field' => 'trip_is_full' ,'value' => 'Open' ,'label' => 'Trip Status (Full or Open)' ,'description' => 'Uneditable based upon number of registrations' ,'attributes' => array( 'readonly' => 'readonly' ) )); piklist('field', array( 'type' => 'text' ,'field' => 'trip_reg_count' ,'label' => 'Trip Registration Count' ,'attributes' => array( 'readonly' => 'readonly' ) )); piklist('field', array( 'type' => 'checkbox' ,'field' => 'trip_location' ,'label' => 'Trip Location' ,'attributes' => array( 'multiple' => 'multiple' ) ,'choices' => piklist( get_posts( array( 'post_type' => 'post_servicelocation' ,'orderby' => 'title' ,'order' => 'asc' ,'posts_per_page' => -1 ) ,'objects' ) ,array( 'ID' ,'post_title' ) ) )); piklist('field', array( 'type' => 'checkbox' ,'scope' => 'taxonomy' ,'field' => 'triptype' ,'label' => 'Trip Type' ,'choices' => piklist( get_terms('triptype', array( 'hide_empty' => false )) ,array( 'term_id' ,'name' ) ) )); piklist('field', array( 'type' => 'datepicker' ,'field' => 'trip_begin' ,'label' => 'Begin Date' ,'options' => array( 'dateFormat' => 'yy-mm-dd' ,'firstDay' => '0' ) )); piklist('field', array( 'type' => 'datepicker' ,'field' => 'trip_end' ,'label' => 'End Date' ,'options' => array( 'dateFormat' => 'yy-mm-dd' ,'firstDay' => '0' ) )); piklist('field', array( 'type' => 'checkbox' ,'field' => 'trip_options' ,'label' => 'Trip Options' ,'description' => 'Select all that apply.' ,'choices' => array( 'hide' => 'Private Event (Hide)' ,'hide_day' => 'Only Display Month and Year (unsure of exact dates)' ,'enable_reg' => 'Enable Registration' ) )); piklist('field', array( 'type' => 'text' ,'field' => 'trip_hide_code' ,'label' => 'Trip Password' ,'description' => 'Code to have users look up hidden event. (MUST BE UNIQUE)' ,'conditions' => array( array( 'field' => 'trip_options' ,'value' => 'hide' ) ) )); $related = get_posts(array( 'post_type' => 'trip_reg' ,'posts_per_page' => -1 ,'post_belongs' => $post->ID ,'post_status' => 'approved' ,'suppress_filters' => false )); if ($related): ?> <h4><?php _e('Registrations', 'Extreme');?></h4> <ol> <?php foreach ($related as $related_post){ $TheUser = get_userdata($related_post->reg_user); ?> <li><?php _e($TheUser->user_login); ?></li> <?php }; ?> </ol> <hr /> <?php endif; ?> -
November 4, 2015 at 11:24 pm #4869
SteveKeymasterIf you remove the Workflow does it work? Try temporarily renaming the workflows/ folder to disable them.
-
November 6, 2015 at 10:09 am #4886
justinMemberYea that seemed to allow me to save correctly. I will try and rebuild the workflow again to see if that fixes it.
Thanks,
-
November 6, 2015 at 10:24 am #4888
SteveKeymasterGreat. Let us know if you need any help. Instructions are here>
-
-
AuthorPosts
- You must be logged in to reply to this topic.