Viewing 2 reply threads
  • Author
    Posts
    • #8772
      anagram
      Member

      Hello there!

      I have a plugin that uses the following structure:

      piklist( 'field', array(
          'type' => 'group',
          'label' => '3-In-1 Settings:',
          'description' => 'desc',
          'add_more' => true
          ,'fields' => array(
      		array(
      	    	'type' => 'select'
      			,'field' => 'a31_post_id'
      			,'value' => '-1'
      		    ,'columns' => 6
      			,'label' => 'Artikel'
      			,'description' => ''
      			,'choices' => array('-1' => 'Wähle eine Seite') + piklist(
      	              get_posts(
      	                 array(
      	                  'post_type' => array('page', 'post', 'stock', 'person')
      	                  ,'posts_per_page' => -1
      	                 )
      	                 ,'objects'
      	               )
      	               ,array(
      	                 'ID'
      	                 ,'post_title'
      	               )
      	            )
      		)
      	)
      	,'validate' => array(
      	  array(
      	    'type' => 'limit',
      	    'options' => array(
      	      'min' => 0,
      	      'max' => 3
      	    )
      	  )
      	)
        ));
      

      This has worked very well and still does on my development server, but on the production system itself, none of the changes are saved.

      I had this problems on more sites, but it was enough to add

      
      add_action( 'init', 'piklist_remove_post_type_support', 10 );
      function piklist_remove_post_type_support() {
        remove_post_type_support( 'page', 'custom-fields' );
        remove_post_type_support( 'post', 'custom-fields' );
      }
      

      to get it working again. I have already done that on both systems but still, nothing gets saved.

      I somehow believe, that the transformation (there’s once this transformation step) has not taken place on the production server – could that be and if yes, can it be somehow triggered?

      The database on both systems is 1:1 the same. As well as the filesystem (i use git to sync both, besides files that are in git.ignore.

      I currently run out of ideas how to solve this.

      best regards, Harald

    • #8773
      anagram
      Member

      Hello there (again),

      besides the fact, that the values were not updated, there was another problem with the encoding. I’m from austria and we use umlauts. So i started investigating why the umlauts were not displayed correctly (only for the metabox shown above, not for other metaboxes that are in use which are showing umlauts correctly).

      It turned out that the others used UTF-8 without BOM while this one was using UTF-8.

      After i changed it to UTF-8 without BOM the umlauts were displayed correctly and also the changes were saved.

      A bit of a surprise for me, but ok – it’s working now.

      Ticket can be closed (@piklist team: the ability to close a ticket (at least for the creator) via a checkbox would make sense so you don’t have to read through and close it manually.)

      best regards, Harald

    • #8780
      Steve
      Keymaster

      Glad you were able to resolve!

Viewing 2 reply threads
  • The topic ‘Piklist values not updated’ is closed to new replies.