Viewing 8 reply threads
  • Author
    Posts
    • #7300
      s1r0n
      Member

      I have meta boxes on my admin screen that are no longer saving data. I have already checked debut, console, and tried

      function post_type_support_init() {
          remove_post_type_support('post', 'custom-fields');
          remove_post_type_support('page', 'custom-fields');
      }

      but so far, no luck. Anybody else having this trouble? Its worked up until now

    • #7303
      Steve
      Keymaster

      Please post your field code here and we’ll take a look

    • #7307
      s1r0n
      Member
      <?php
      /*
      Title: LP Publisher Book Promotion
      Priority: high
      Post Type: post,page,book
      */ 
       
       global $wpdb;
       global $current_user;
       
       echo "<h2>Promote a book</h2>";
       
       $book_details    = $wpdb->get_results("select book_id, title  from avatar_books");
      
       $choices[0]='---';
       foreach ($book_details as $book) {
           $choices[$book->book_id] = $book->title;
          
       }
       
       if ($current_user->ID == 1) {
       piklist('field', array(
          'type' => 'select'
          ,'field' => 'is_excerpt'
          ,'label' => 'Book excerpt'
          ,'description' => 'Is this article excerpted from a book?'
           ,'value' => ''
          ,'attributes' => array(
            'class' => 'text'
           )
          ,'choices' => array(''=>'','y'=>'Y')
        ));
      
        piklist('field', array(
          'type' => 'select'
          ,'field' => 'is_excerpt_complete'
          ,'label' => 'Is Complete'
          ,'description' => 'Is this excerpt a complete chapter?'
           ,'value' => ''
          ,'attributes' => array(
            'class' => 'text'
           )
          ,'choices' => array(''=>'','y'=>'Y')
        ));
       }
       piklist('field', array(
          'type' => 'select'
          ,'field' => 'book_id'
          ,'label' => 'Promote a single book'
          ,'value' => ''
          ,'attributes' => array(
            'class' => 'text'
           )
          ,'choices' => $choices
        ));
      
       /*
        piklist('field', array(
          'type' => 'select'
          ,'field' => 'output_style'
          ,'label' => 'Output style'
          ,'value' => ''
          ,'attributes' => array(
            'class' => 'text'
           )
          ,'choices' => array(''=>'---','full'=>'Full','compact'=>'Compact')
        ));
      */
       
           piklist('field', array(
       'type' => 'text'
       ,'field' => 'promo_header'
       ,'label' => 'Promo Header'
       ,'description' => 'Title used to introduce the ad at the bottom of the page'
       ,'attributes' => array(
         'size' => 50
       )
       ));  
        piklist('field', array(
       'type' => 'textarea'
       ,'field' => 'alt_book_description'
       ,'label' => 'Alternative Book Description'
       ,'description' => 'Replace the description in the database with the one here'
       ,'attributes' => array(
         'rows' => 5
         ,'cols' => 50
         ,'class' => 'large-text'
       )
       ));
        
        piklist('field', array(
       'type' => 'text'
       ,'field' => 'alt_title'
       ,'label' => 'Alternate Title'
       ,'description' => 'used in the widget title and elsewhere'
       ,'attributes' => array(
         'size' => 50
       )
       ));
        piklist('field', array(
       'type' => 'text'
       ,'field' => 'widget_blurb'
       ,'label' => 'A short blurb used in the widget footer'
       ,'description' => 'Should fit comfortably in a widget sidebar'
       ,'attributes' => array(
         'size' => 100
         ,'class' => 'text'
       )
       ));
        
      
      /*
      echo "Finally, choose the elements of the book display you wish to suppress. ";
      piklist('field', array(
      'type' => 'select'
      ,'scope' => 'post_meta' // Not used for settings sections
      ,'field' => 'suppress'
      ,'value' => 'option2' // Sets default to Option 2
      ,'label' => 'Suppress'
      ,'description' => 'Choose elements of the book display to suppress'
      ,'attributes' => array(
        'class' => 'text'
         ,'multiple' => 'multiple'
      )
      ,'choices' => array(
        'none'    => 'none'
       ,'title' => 'Title'
       ,'author' => 'Author'
       ,'isbn' => 'ISBN'
      )
      ));
      */
      
      ?>

      This won’t help. these have been working without hitch until just recently.

    • #7308
      Steve
      Keymaster

      So what changed? WordPress upgrade? Plugins upgrade?

      Deactivate other plugins to see if there is a conflict

    • #7312
      s1r0n
      Member

      Nothing. And the really weird thing is, it works on other sites. I have unplugged all plugins, and changed theme to the default, and it still doesn’t work.

      I may have to go into the piklist code to debug. does pilist have its own save_meta routines?

    • #7315
      Steve
      Keymaster

      @s1r0n– What host are you running it on? Some of the hosts that are aggressive with caching might cause an issue.

    • #7319
      s1r0n
      Member

      i run my own server. I was running through Cloudflare but I’ve deactivated that. I’ve deactivated Cometcache. Still, just dead. Now it’s dead on all my sites. Even the Piklist settings page doesn’t save its settings. It reads them fine, but it doesnt save them.

      Could this have something to with with the upgrade to .9.8 or whatever.

    • #7323
      s1r0n
      Member

      I fixed it. I has a routine where I was messing with the metadata. It was conflicting in some fashion.

    • #7324
      Steve
      Keymaster

      Great! Closing ticket.

Viewing 8 reply threads
  • The topic ‘Meta data not saving’ is closed to new replies.