Viewing 5 reply threads
  • Author
    Posts
    • #630
      edbury
      Member

      I’m getting a string of errors from PHP on update of a single field:


      Warning: Invalid argument supplied for foreach() in /Users/edbury/Dropbox/MAMP/h20wp/wp-content/plugins/piklist/includes/class-piklist-form.php on line 1402

      Warning: array_keys() expects parameter 1 to be array, null given in /Users/edbury/Dropbox/MAMP/h20wp/wp-content/plugins/piklist/includes/class-piklist-form.php on line 1410

      Warning: array_diff(): Argument #1 is not an array in /Users/edbury/Dropbox/MAMP/h20wp/wp-content/plugins/piklist/includes/class-piklist-form.php on line 1410

      Warning: array_filter() expects parameter 1 to be array, null given in /Users/edbury/Dropbox/MAMP/h20wp/wp-content/plugins/piklist/includes/class-piklist-form.php on line 1410

      Warning: Invalid argument supplied for foreach() in /Users/edbury/Dropbox/MAMP/h20wp/wp-content/plugins/piklist/includes/class-piklist-form.php on line 1229

      Warning: Invalid argument supplied for foreach() in /Users/edbury/Dropbox/MAMP/h20wp/wp-content/plugins/piklist/includes/class-piklist-form.php on line 1402

      Warning: array_keys() expects parameter 1 to be array, null given in /Users/edbury/Dropbox/MAMP/h20wp/wp-content/plugins/piklist/includes/class-piklist-form.php on line 1410

      Warning: array_diff(): Argument #1 is not an array in /Users/edbury/Dropbox/MAMP/h20wp/wp-content/plugins/piklist/includes/class-piklist-form.php on line 1410

      Warning: array_filter() expects parameter 1 to be array, null given in /Users/edbury/Dropbox/MAMP/h20wp/wp-content/plugins/piklist/includes/class-piklist-form.php on line 1410

      Warning: Invalid argument supplied for foreach() in /Users/edbury/Dropbox/MAMP/h20wp/wp-content/plugins/piklist/includes/class-piklist-form.php on line 1229

      Warning: Cannot modify header information - headers already sent by (output started at /Users/edbury/Dropbox/MAMP/h20wp/wp-content/plugins/piklist/includes/class-piklist-form.php:1402) in /Users/edbury/Dropbox/MAMP/h20wp/wp-includes/pluggable.php on line 876

      (I don’t mind if you guys see my local paths ;] )

      Here’s the code from my field array:


      piklist('field', array(
      'type' => 'datepicker'
      ,'scope' => 'post_meta'
      ,'field' => 'deadline'
      ,'label' => 'Deadline'
      ,'description' => 'Click in box'
      ,'attributes' => array(
      'class' => 'text'
      )
      ,'options' => array(
      'dateFormat' => 'yy-mm-dd'
      ,'firstDay' => '0'
      )
      ));

      The field shows up as expected and the datepicker works like a charm.

      Any ideas?

      Update: It’s worth mentioning that the data seems to be saved, despite this error.

    • #634
      Steve
      Keymaster

      @edbury–  Please send us your WordPress and PHP versions.  You can email it to us via our contact form.

    • #657
      Kevin
      Keymaster

      @edbury – Where are you putting this code? I put it into a meta-box file and it works like a charm.

      Thanks,

      Kevin

    • #660
      edbury
      Member

      It’s in a meta-box part file; the meta-box shows up correctly on the post edit screen; it’s only on updating that the error occurs.

    • #663
      Kevin
      Keymaster

      @edbury

      Can you post your meta box file? I tested with your field in the Demos Add-On and it worked perfectly, so I am thinking it must be something else/close to the field 🙂

      Thanks,

      Kevin

    • #668
      edbury
      Member

      It’s actually happening across the board. Same error, different metabox file:

      https://gist.github.com/4697793

      The data is still saving to the DB and shows up correctly when you revisit the post edit page.

      This one is on WP 3.5.1 with the latest Piklist.

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