#1145 closed defect (fixed)
Added a new online resouce does not locate the id on file upload
Reported by: | ianwallen | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | v2.8.0 |
Component: | General | Version: | v2.8.0RC2 |
Keywords: | File for download | Cc: |
Description
When adding a new online resource and then selecting "file for download" the "file upload" button shows up. However clicking on the button does not work. There is an error due to the ID missing from the startFileUpload. It is looks something like the following.
startFileUpload(, '999');
Workaround: Save the document which will cause it to get reloaded and then it will locate the ID and the file can be loaded.
Note sure if this is related to Ticket #512 http://osgeo-org.1560.n6.nabble.com/Creating-child-bug-tc3875903.html
Change History (3)
comment:1 by , 12 years ago
Keywords: | File for download added |
---|
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in commit ed4078ae91c30100031a8df194a8edb656d9c33c
comment:3 by , 12 years ago
Hi Simon,
Thanks for fixing that. I patched metadata-iso19139.xsl. Confirmed the upload button working OK with iso19139, iso19139.anzlic and iso19139.mcp1.4
Andrew
Hi Ian,
Confirm I get the exact same issue with schemas iso19139, iso19139.anzlic and iso19139.mcp-1.4. Also confirm that your 'Save'/Upload workaround works but this is won't be intuitive for any lay users.
Some more details:
To reproduce: -In editor Add (+) Online Resource -Select Protocol - "File for download" -FILE UPLOAD button appears -Click the Button
Firebug console shows Javascript error startFileUpload(,'186') This function is line 644 in file gn.editor.js.
Seems that the problem is the gmd:URL (with the ID/UUID) is missing initially as you noted. When the 'Save' workaround is done the gmd:URL is filled.
Fix might be:
-If protocol 'file for download' selected look up the gmd:URL and fill it with this base URL (without fname):
http://localhost:8080/geonetwork/srv/en/file.disclaimer?uuid=e8b0f573-bc13-4c2c-80e0-f1812e863292&fname=&access=private
Then I guess the FILE UPLOAD button should work and the upload would fill in the fname argument.
Developers,
Could this issue be pushed up on the priority list. Being able to attach a real data to the metadata is IMHO an important and really useful function.
Regards,
Andrew