Tagged: , ,

Viewing 2 reply threads
  • Author
    Posts
    • #8954
      naurojr
      Member

      After some struggle to update from 0.9.4.28 to 0.11.1 I’m down to two errors that I’m not sure why they are happening.

      Warning: sprintf(): Too few arguments in /nas/content/staging/orderdesigndpt/wp-content/plugins/piklist/includes/class-piklist-form.php on line 1992

      Warning: strstr(): Empty needle in /nas/content/staging/orderdesigndpt/wp-content/plugins/piklist/includes/class-piklist-form.php on line 2536

      The code works fine on 0.9 but it crashes on the new versions.

      I have 4 meta-boxes on the same page, the first two works, the third and fourth no.
      See code below and attached screenshots. Can you guys give me some guidance on what is wrong?

      <?php
      /*
      Title: Items
      Post Type: salesorder
      Collapse: false
      Order: 3
      Locked: true
      */

      $manufacturers_id = get_manufacturers_list();
      $collections_id = get_collections_list();

      piklist(‘field’, array(
      ‘type’ => ‘group’
      ,’label’ => __(‘Add Products to the Order’)
      ,’template’=>’order_items’
      ,’add_more’ => true
      ,’fields’ => array(
      array(
      ‘type’ => ‘text’
      ,’field’ => ‘order_item_qnty’
      ,’label’ => ‘Qnty’
      ,’required’ => true
      ,’columns’ => 1
      )
      ,array(
      ‘type’ => ‘select’
      ,’required’ => true
      ,’field’ => ‘order_item_pd’
      ,’label’ => ‘Pd’
      ,’required’ => true
      ,’columns’ => 3
      ,’choices’ => $collections_id
      ,’validate’ => array(array(‘type’ => ‘collections_select’))
      )
      ,array(
      ‘type’ => ‘select’
      ,’field’ => ‘order_item_manufacturer_id’
      , ‘required’ => true
      ,’label’ => ‘Manufacturer’
      ,’columns’ => 3
      ,’choices’ => $manufacturers_id
      ,’validate’ => array(array(‘type’ => ‘manufacturer_select’))
      )
      ,array(
      ‘type’ => ‘text’
      ,’field’ => ‘order_item_unit_price’
      , ‘required’ => true
      ,’label’ => ‘Unit Price’
      ,’value’=>number_format(0,2)
      ,’columns’ => 2
      ,’attributes’ => array(‘class’=>’text-right readonly’)
      )
      ,array(
      ‘type’ => ‘number’
      ,’field’ => ‘order_item_discount’
      ,’label’ => ‘Setoff’
      ,’value’=>’0′
      ,’columns’ => 1
      ,’attributes’ => array(‘class’=>’text-right readonly’, ‘maxlenght’=>’3’, ‘min’=>’0’, ‘max’=>’100’)
      )
      ,array(
      ‘type’ => ‘text’
      ,’field’ => ‘order_item_total’
      ,’label’ => ‘Total’
      ,’value’ => ‘0’
      ,’columns’ => 2
      ,’attributes’ => array(‘class’=>’text-right readonly’, ‘readonly’=>’true’)
      )
      ,array(
      ‘type’ => ‘text’
      ,’field’ => ‘order_item_code’
      ,’label’ => ‘Code’
      ,’required’ => true
      ,’columns’ => 7
      ,’attributes’ => array(‘maxlength’=>’30’, ‘autocomplete’=>’off’)
      )
      ,array(
      ‘type’ => ‘text’
      ,’field’ => ‘order_item_description’
      ,’label’ => ‘Description’
      , ‘required’ => true
      ,’columns’ => 3
      ,’attributes’ => array(‘maxlength’=>’20’, ‘autocomplete’=>’off’)
      )
      ,array(
      ‘type’ => ‘select’
      ,’field’ => ‘order_item_stock_status’
      ,’label’ => ‘Stock Status’
      ,’required’ => true
      ,’columns’ => 2
      ,’choices’ => array(‘na’=>”, ‘st’=>’Stock’, ‘fs’=>’Floor Sample’, ‘so’=>’Special Order’)
      )
      )
      ));
      ?>

      Attachments:
      You must be logged in to view attached files.
    • #8957
      naurojr
      Member

      Please ignore this questions.
      I’ve figured out that the problem was on the custom template for the fields group.
      Just a reminder to always check the documentation before you update 🙂

    • #8958
      Steve
      Keymaster

      Glad you got it working!

Viewing 2 reply threads
  • The topic ‘PiKList Error after update’ is closed to new replies.