Viewing 2 reply threads
  • Author
    Posts
    • #8681
      riotxoa
      Participant

      Hello,

      I have one meta-box configured as follows:

      
      piklist('field', array(
          'type' => 'file',
          'field' => 'section_images',
          'label' => 'Carousel Images',
          'options' => array(
              'save' => 'url',
              'modal_title' => 'Add images',
              'button' => 'Select'
          ),
      ));
      

      The images’ URL are saved OK on first load, but if I reorder images doing drag’n drop, then the images’ URL’s are replaced by their ID’s in database.

      I’ve found the way to show the images when the metadata is a URL or an ID (with a code snippet in the PHP template), but I think it would be interesting to solve this issue.

      Thank you and best regards,

      Ricardo

    • #8684
      Steve
      Keymaster

      @riotxoaPlease try out latest beta and let us know if that fixes your issue.

    • #8687
      riotxoa
      Participant

      0.10 Beta 2 continues repeating the same issue.

      This is the wp_postmeta table content at start point (JSON export):

      
      {"meta_id":"277612","post_id":"17832","meta_key":"section02_images","meta_value":"http:\/\/localhost:8080\/wordpress\/wp-content\/uploads\/2017\/12\/ZTE-BLADE-A6-LITE-front.jpg"},
      {"meta_id":"277613","post_id":"17832","meta_key":"section02_images","meta_value":"http:\/\/localhost:8080\/wordpress\/wp-content\/uploads\/2017\/12\/ZTE-BLADE-A6-LITE-back.jpg"},
      {"meta_id":"277614","post_id":"17832","meta_key":"section02_images","meta_value":"http:\/\/localhost:8080\/wordpress\/wp-content\/uploads\/2017\/12\/ZTE-BLADE-A6-LITE.jpg"}, 
      {"meta_id":"277615","post_id":"17832","meta_key":"section02_images","meta_value":"http:\/\/localhost:8080\/wordpress\/wp-content\/uploads\/2017\/12\/ZTE-BLADE-A6-LITE-lateral.jpg"}
      

      An after reorder images doing drag’n drop:

      
      {"meta_id":"277612","post_id":"17832","meta_key":"section02_images","meta_value":"16700"}, 
      {"meta_id":"277613","post_id":"17832","meta_key":"section02_images","meta_value":"16699"}, 
      {"meta_id":"277614","post_id":"17832","meta_key":"section02_images","meta_value":"16698"}, 
      {"meta_id":"277615","post_id":"17832","meta_key":"section02_images","meta_value":"16697"}
      

      Thank you,

      Ricardo

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