Viewing 17 reply threads
  • Author
    Posts
    • #4478
      shayneol
      Member

      I am working with Steve on another issue (https://piklist.com/support/topic/piklist-wysiwyg-breaking-format-in-piklist-group/#post-4465). Since this is a totally different problem, I’m opening another topic.

      After updating to Piklist V0.9.9.1, I now cannot publish posts. When I click the Publish button, the post always stays as Draft, even if I manually choose Publish from the Status drop-down menu. The only way it lets me change to Publish is if I back out to the posts list in the admin screen and change the status using a quick edit.

      The above issues happens after I associate a metabox to my custom post type. If no metabox is associated to the custom post type, it will let me publish the post.

      MY CUSTOM POST TYPE CODE

      /*******************************************************************************
      * Calendar Post Type
      * ===================
      *******************************************************************************/
      add_filter('piklist_post_types', 'ug_calendar_post_type');
       function ug_calendar_post_type($post_types)
       {
        $post_types['ug_calendar'] = array(
          'labels' => piklist('post_type_labels', 'Calendar')
          ,'title' => __('Enter a new event')
          ,'public' => true
      	,'menu_icon' => plugins_url('piklist/parts/img/dw-admin-icon.png') 
      	,'page_icon' => plugins_url('piklist/parts/img/dw-page-icon-32.png')
          ,'rewrite' => array(
            'slug' => 'ug-calendar'
          )
          ,'supports' => array(
            'author'
      	  ,'title'
      	  ,'page-attributes'
            ,'revisions'
      	  ,'comments'
          )
          ,'hide_meta_box' => array(
            'author'
      	  ,'comments'
      	  ,'revisons'
          )
        );
      return $post_types;
      }
      

      MY METABOX CODE (copied straight from the draggable editor demo file. I changed the post type parameter and removed the tabs, however)

      <?php
      /*
      Title: Draggable Editor
      Post Type: ug_calendar
      Order: 110
      */
      
        piklist('field', array(
          'type' => 'editor'
          ,'field' => 'post_content_full'
          ,'scope' => 'post_meta'
          ,'template' => 'field'
          ,'value' => sprintf(__('You can remove the left label when displaying the editor by defining %1$s in the field parameters. This will make it look like the default WordPress editor. To learn about replacing the WordPress editor %2$sread our Tutorial%2$s.', 'piklist-demo'), '<code>\'template\'=>\'field\'</code>', '<a href="http://piklist.com/user-guide/tutorials/replacing-wordpress-post-editor/">', '</a>')
          ,'options' => array (
            'wpautop' => true
            ,'media_buttons' => true
            ,'shortcode_buttons' => true
            ,'tabindex' => ''
            ,'editor_css' => ''
            ,'editor_class' => ''
            ,'teeny' => false
            ,'dfw' => false
            ,'tinymce' => array(
              'resize' => false
              ,'wp_autoresize_on' => true
            )
            ,'quicktags' => true
            ,'drag_drop_upload' => true
          )
          ,'on_post_status' => array(
            'value' => 'lock'
          )
        ));
      
        piklist('shared/code-locater', array(
          'location' => __FILE__
          ,'type' => 'Meta Box'
        ));
    • #4482
      Steve
      Keymaster

      @shayneol– Did you see the button to run the Piklist upgrade script?

      If no, please pull the latest version from trunk and try again.

      Let us know if that fixes the issue.

    • #4485
      shayneol
      Member

      Hello Steve,

      Yes, I’ve run the script. I’m using the exact same WordPress installation from this topic the you’re currently helping me out on (https://piklist.com/support/topic/piklist-wysiwyg-breaking-format-in-piklist-group/#post-4465).

      Also, this Custom Post Type was just created and had no prior entries.

      Thanks,
      Shayne

    • #4488
      Steve
      Keymaster

      @shayneol– I was not able to reproduce your issue. Here are a few things that might help:

      1) Turn on wp_debug and see if you get any errors.
      2) Deactivate all other plugins and change your theme to twentyfifteen.
      3) Change your editor field to something simpler like a text field.

      Let us know if any of these things help.

    • #4491
      shayneol
      Member

      Hello steve,

      1) I changed the metabox code to the following text field:

      <?php
      /*
      Title: Text Field
      Post Type: ug_calendar
      Order: 110
      */
      
        piklist('field', array(
          'type' => 'text'
          ,'field' => 'text'
          ,'label' => __('Text', 'piklist-demo')
          ,'help' => __('You can easily add tooltips to your fields with the help parameter.', 'piklist-demo')
          ,'attributes' => array(
            'class' => 'regular-text'
          )
        ));
      

      2) Turned off all plugins
      3) Turned on wp_debug and received several errors in regards to WP_Wdiget beging depricated
      4) After fixing those errors, I still could not get the post to Publish
      5) I switched to the Twenty Fifteen theme with the same results
      6) I even tried redeclaring the Custom Post Type via WordPress’ regular means.

      function calendar_cpt() {
        $labels = array(
          'name'               => _x( 'Calendar', 'post type general name' ),
          'singular_name'      => _x( 'Calendar', 'post type singular name' ),
          'add_new'            => _x( 'Add New', 'Calendar' ),
          'add_new_item'       => __( 'Add New Calendar' ),
          'edit_item'          => __( 'Edit Calendar' ),
          'new_item'           => __( 'New Calendar' ),
          'all_items'          => __( 'All Calendar Items' ),
          'view_item'          => __( 'View Calendar' ),
          'search_items'       => __( 'Search Calendar' ),
          'not_found'          => __( 'No item found' ),
          'not_found_in_trash' => __( 'No item found in the Trash' ), 
          'parent_item_colon'  => '',
          'menu_name'          => 'Calendar'
        );
        $args = array(
          'labels'        => $labels,
          'description'   => 'Upcoming Events',
          'public'        => true,
          'menu_position' => 5,
          'supports'      => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments' ),
          'has_archive'   => true,
        );
        register_post_type( 'ug_calendar', $args ); 
      }
      add_action( 'init', 'calendar_cpt' );
      

      7) I then downgraded to a Piklist version that I used in another project (v. 0.9.4.28) and Publishing the post was successful.

    • #4495
      Steve
      Keymaster

      @shayneol— Please zip up your code and email to [email protected] It will be easier to debug that way.

    • #4505
      shayneol
      Member

      Ok. I just email it

    • #4506
      Steve
      Keymaster

      @shayneol– I just installed your theme and was able to publish a Calendar, Leadership and Ministry. Is there anything special I need to do to reproduce your issue?

    • #4508
      shayneol
      Member

      I just emailed you a screencast of what I am doing. There is nothing special to the process. For this particular project, I am just starting out, so if you think I should re-upload all the files and use a new database, I can try that.

    • #4510
      shayneol
      Member

      Hello Steve,

      Thanks for all of the emails back and forth. I just finished resetting everything:
      1) Deleted all files and database
      2) Created new database and uploaded new files to the server
      3) WordPress 4.3.1, Piklist 0.9.9.2
      4) I first tried saving on the Twenty Fifteen theme and it worked fine
      5) Then switched to my custom theme and the save feature worked fine

      I’m not sure what was happening, but that issue seems to be resolved. Thanks a lot for your help on this.

      Shayne

    • #4518

      I’m also having the same issue with Piklist 0.9.9.2

    • #4519
      Steve
      Keymaster

      Carla– I’m going to email you so we can debug.

    • #4520

      I did a database reset and it looks to have fixed the issue.

    • #4521
      Steve
      Keymaster

      Hi txhorselady– Sent you two emails. Please let me know if you received them.

    • #4526
      Mehdi Salem
      Member

      I confirm the presence of the same problem here on a WordPress multisite install…

      To fix the issue, I just created another site on the network, exported and imported all content to the new instance, activated my Piklist powered Genesis child theme and the problem seem to have disappeared, I am able now to publish new posts, no more getting stuck on draft status.

      Note that I was never prompted by Piklist 0.9.9.2 nor by 0.9.9.1 to run an upgrade script when updating from Piklist 0.9.5v

      This is not a production site but I would love to see the upgrade process smooth for when I’ll update my production sites, so if I can be of any help let me know Steve

    • #4527
      Steve
      Keymaster

      If anyone runs into this issue again, please don’t fix it by resetting your db. Email us at [email protected] We need to examine a broken site.

    • #4531
      Mehdi Salem
      Member

      Hey Steve, I did not fix the broken site on my network, just created a new site to continue my work bug free…

      So the broken site is all yours waiting 🙂

      Let me know when you are ready to examine it and I’ll provide you with credentials

    • #4546
      Steve
      Keymaster

      @mnlearth– Thank you so much for giving us access to your site. The issue is fixed! We will release the fix in 0.9.9.3 as soon as we fix a few more issues.

Viewing 17 reply threads
  • The topic ‘Publishing Post (Piklist v0.9.9)’ is closed to new replies.