• Hello,

    There seems to be a bug with the Pods widget “Pods – List Items”, any posts posted after the first shows up as “Auto Draft”.

    Already tried the following but to no avail:

    1. Delete widget > Save > Recreate widget
    2. Create new post
    3. Clear all cache (although I have ‘no cache’ in the widget itself)
    4. Force refresh
    5. Try other browsers

    Or, anything I missed or did wrong?

    New site: https://gameshogun.xyz

    Thank you.

    https://www.ads-software.com/plugins/pods/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Jim True

    (@jimtrue)

    Auto Draft would be the ‘title’ of your Pods Post if you’re not using a Post Title for that field. Without knowing the settings in your List Widget, it’s very hard to troubleshoot why you’re getting ‘Auto Draft’ for the second news item, when it is providing the permalink to the article.

    What do you have in your Pods – List Items widget? Screens shots would be helpful.

    Thread Starter ???? (Yuki|雪亮) ????

    (@laibcoms)

    Hi,

    Thank you for the reply. The code is:

    <ul>
    <li><a href="{@permalink}">{@post_title}</a></li>
    </ul>

    The opening and closing ul tags are in before and after fields respectively.

    screenshot

    Thank you again.

    Plugin Contributor Jim True

    (@jimtrue)

    Are you using some kind of caching? The Auto Draft is like an ‘old issue’, like it’s storing your post revision and showing that instead of the actual post with the post title.

    Thread Starter ???? (Yuki|雪亮) ????

    (@laibcoms)

    Hi,

    I only have WordFence cache. I disabled it now, cleared the cache, and published a test post, unfortunately, it still shows as “Auto Draft”.

    Before and after disabling the WordFence cache, it’s the same thing, only posts posted in a Pod shows as “Auto Draft” and only in the Pod provided widget. All other posts work fine.

    Anyway, thank you for the assistance. I’ll just think of another way to display the posts.

    Best regards,

    Plugin Contributor Jim True

    (@jimtrue)

    How do you have the Pod Configured? We’ve had issues with Auto Draft when someone removes the ‘title’ field, but I’ve never seen what you’re experiencing.

    Thread Starter ???? (Yuki|雪亮) ????

    (@laibcoms)

    Hello,

    Yep, I’ve seen that one though not sure if it’s related, I haven’t touched the ‘title’. The settings are currently basic:
    * Title
    * Editor
    * Featured Image
    * Excerpt
    * Custom Fields
    * Comments
    * Jetpack Publicize Support

    Nothing in “Advanced Supports”.

    Built-In Taxonomies
    * Categories (wp built-in)
    * Genre (pod)
    * Tags (wp built-in)
    * Products (pod)

    I already had “title” activated when I first created the custom posttype via Pods.

    Oh, just remembered, I’m not sure if this is affecting it or something.

    // BGN: Show Custom Post Types
    add_action( 'pre_get_posts', 'show_cpt_global' );
    function show_cpt_global( $query ) {
      $post_types = array( 'post', 'pressrelease' );
    
      if ( !is_admin() && !is_feed() ) {
        if( !is_post_type_archive() && $query->is_archive() ) {
          $query->set( 'post_type', array( 'post', 'pressrelease' ) );
          return $query;
        }
    /*
        // is_category() || is_tag()
        //if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
        if( is_category() || is_tag() ) {
          $query->set( 'post_type', array( 'post', 'nav_item_menu', 'pressrelease' ) );
          return $query;
        }
    
        //if( is_archive() && !is_post_type_archive() && empty( $query->query_vars['suppress_filters'] ) ) {
        if( is_archive() && !is_post_type_archive() ) {
          $query->set( 'post_type', array( 'post', 'pressrelease' ) );
          return $query;
        }
    
        //if( is_front_page() && is_home() && empty( $query->query_vars['suppress_filters'] ) ) {
        if( $query->is_main_query() ) {
          $query->set( 'post_type', $post_types );
          return $query;
        }
    */
      }
    }
    // END: Show Custom Post Types
    
    // BGN: Fallback Featured Images by Category
    function fallback_get_post_metadata( $spare , $object_id , $meta_key , $single ) {
      // only interested if this is a call for a thumbnail id in the public interface
      if ( is_admin() || $meta_key != '_thumbnail_id' ) return;
    
      // check for an existing thumbnail - note cannot use any function that will set up infinite loop!
      $meta_cache = wp_cache_get( $object_id , 'post_meta' );
    
      if ( !$meta_cache ) {
        $meta_cache = update_meta_cache( 'post' , array( $object_id ) );
        $meta_cache = $meta_cache[$object_id];
      }
      // if post has a thumbnail then return null to contine
      if ( isset( $meta_cache[$meta_key] ) ) return $meta_cache[$meta_key];
      // now we need to get the id for the category
    
      // get the categories assigned to the post
      $post_cats = get_the_category( $object_id );
      // no categories, unlikely but can't do anything
      if ( count( $post_cats ) == 0 ) return null;
      // we'll just take the first
      $term_id = $post_cats[0]->term_id;
      // using function from plugin, get the id of the category image
      $attach_id = WPCustomCategoryImage::get_attachment_id( $term_id );
      // no category image, out of here
      if ( !$attach_id ) return null;
      // now store this in the post's metadata using id _thumbnail_id
      return $attach_id;
    }
    add_filter( 'get_post_metadata' , 'fallback_get_post_metadata' , 10 , 4 );
    // END: Fallback Featured Images by Category

    I get confused as to why the first post displays fine in the widget but the next ones not. And it’s only affecting the said widget, the posts itself displays the titles, and the URLs are correct too.

    Thank you.

    Plugin Contributor Jim True

    (@jimtrue)

    JC, can you bring this issue onto our Pods Slack Chat? We seem to be going back and forth with incredibly long gaps inbetween and you’d get much faster response by joining us in chat I believe.

    https://pods.io/forum/chat/

    Plugin Contributor Jim True

    (@jimtrue)

    JC I’m marking this issue resolved. If you are still having issues with it, please bring the issue over to our Slack Chat for Pods:

    https://pods.io/forum/chat/

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Auto Draft in Pods Widget’ is closed to new replies.