Viewing 3 reply threads
  • Author
    Posts
    • #4846
      justin
      Member

      When 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;
      
        ?>
    • #4869
      Steve
      Keymaster

      If you remove the Workflow does it work? Try temporarily renaming the workflows/ folder to disable them.

    • #4886
      justin
      Member

      Yea that seemed to allow me to save correctly. I will try and rebuild the workflow again to see if that fixes it.

      Thanks,

    • #4888
      Steve
      Keymaster

      Great. Let us know if you need any help. Instructions are here>

Viewing 3 reply threads
  • You must be logged in to reply to this topic.