AtlasOfLivingAustralia / pigeonhole

(Deprecated) Provide a HTML front end tool for identification pre-submission based on the data in the Atlas and any other additional web services that may assist (lists of weeds etc)
Mozilla Public License 2.0
0 stars 1 forks source link

Edit and adding new images to existing record breaks links #21

Closed djtfmartin closed 9 years ago

djtfmartin commented 9 years ago

To reproduce on http://pigeonhole-dev.ala.org.au:

  1. Submit a record with an image
  2. Edit the record and add a new image & submit

Image display becomes broken in the /recent display and on the Edit screen (on selecting to edit a second time).

Image URLs become:

"http://images-dev.ala.org.au/image/proxyImageThumbnailLarge?imageId=d8484dae-fe9c-4c03-9725-cb3eed8fe3d9,http://pigeonhole-dev.ala.org.au/uploads/image_117726e9-df51-430f-96e1-399358387ac9.jpg"

screenshot 2015-06-17 16 28 08

djtfmartin commented 9 years ago

Digging deeper, this is a bug with the javascript.

The JS maintains hidden fields for each of the images

and the problems arise when adding new images to a record that already has images because the same index (multimedia[idx]) is getting used for 2 images.

nickdos commented 9 years ago

Just tested on pigeonhole-dev.ala.org.au and now works. Tested replacing image, adding image, new sighting, add two images and then remove first image before submitting.