Viewing 2 reply threads
  • Author
    Posts
    • #3900
      kattagami
      Member

      Hi,

      It seems there is a bug in the way the array is builed when we use a media uploader button in a repeater field.

      For instance, with the Piklist Demos Widgets, choose “Basic” in the select box, then fill in the “Slide Images” repeater field with the “Add Media” button. Add two group field.

      This is the array generated:

      Array
      (
          [text_class_small] => Lorem
          [text_columns_element] => Lorem
          [text_add_more] => Lorem
          [number] => 5
          [demo_textarea_large] => Lorem ipsum dolor sit amet, consectetur adipiscing elit.
          [upload_media] => Array
              (
                  [0] => 
              )
      
          [slides] => Array
              (
                  [image] => Array
                      (
                          [0] => 54
                          [1] => Array
                              (
                                  [0] => undefined
                                  [1] => 52
                              )
      
                      )
      
                  [url] => Array
                      (
                          [0] => 
                          [1] => 
                      )
      
              )
      
          [slides_basic] => Array
              (
                  [image] => Array
                      (
                          [0] => 
                      )
      
                  [url] => 
              )
      )
      

      First image: [0] => 54
      Second image: [1] = > Array
      (
      [0] => undefined
      [1] => 52
      )

      > After the first key/value, Piklist generate an undefined value
      Piklist 0.9.4.27

    • #3905
      Steve
      Keymaster

      It’s already on our todo list 😉

      You should be able to just target array_key[1]. Do you need help, or do you have a work around?

    • #3912
      kattagami
      Member

      Ok, noticed!
      I would be able to deal with this pending the patch.

      Thanks

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