Tagged: 

Viewing 3 reply threads
  • Author
    Posts
    • #8830
      stham
      Member

      Hello,

      I basically have the same problem as mentioned in this topic > https://piklist.com/support/topic/only-one-image-is-saved/

      I have an upload field in a metabox for a custom post type like so:

      piklist( 'field', array(
      	'type'     => 'file',
      	'scope'    => 'post_meta',
      	'label'    => __( 'Images', 'sophi' ),
      	'field'    => 'sophi_place_gallery_photos',
      	'options'  => array(
      		'modal_title' => __( 'Add Image', 'sophi' ),
      		'button'      => __( 'Add', 'sophi' )
      	),
      	'validate' => array(
      		array(
      			'type' => 'image'
      		)
      	)
      ) );

      I need the field to accept any number of images that the user would want to attach. Currently, the field will only save one image at a time. I can select multiple images to add (in the modal) but after clicking on the post publish/update button, only the last image gets saved and the other images disappear.

      I tried the same update instructions as nnovosad, i.e. the ones from here > https://piklist.com/support/topic/9-9-data-update-script-not-triggered/#post-8808
      I didn’t get any errors but the problem still persists.

      This code was working fine about 2-3 weeks ago. I didn’t touch it after that and only noticed earlier this week that it stopped saving more than one image at a time.

      I checked the db and found that there used to be multiple entries of sophi_place_gallery_photos (for a single custom post type) in the postmeta table, each with the ID of the image attachment that I had saved. Now, only one entry exists per post, even when I attempt to save multiple images at a time.

      Any suggestions on how to fix this would be much much appreciated.

      Thanks in advance.

    • #8837
      Steve
      Keymaster

      Sorry about that. We just release v0.9.9.16 which should fix the issue.

    • #8840
      stham
      Member

      Thanks so much, Steve! Works like a dream now.

    • #8841
      Steve
      Keymaster

      Great! Closing this ticket.

Viewing 3 reply threads
  • The topic ‘Uploader field only saves one file instead of multiple’ is closed to new replies.