[GeoNetwork-devel] [GeoNetwork opensource Developer website] #1145: Added a new online resouce does not locate the id on file upload

#1145: Added a new online resouce does not locate the id on file upload
-----------------------+----------------------------------------------------
Reporter: ianwallen | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC2
Keywords: |
-----------------------+----------------------------------------------------
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

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1145&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#1145: Added a new online resouce does not locate the id on file upload
-------------------------------+--------------------------------------------
Reporter: ianwallen | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC2
Keywords: File for download |
-------------------------------+--------------------------------------------
Changes (by awalsh):

  * keywords: => File for download

Comment:

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:

- I am testing GN 2.8RC2 + ANZMEST 2.8RC2
- Have the file.disclaimer service option switched ON in admin sys. config
- Auto fixes ON (update-fixed.info.xsl )in admin sys. config

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

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1145#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#1145: Added a new online resouce does not locate the id on file upload
------------------------+---------------------------------------------------
  Reporter: ianwallen | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC2
Resolution: fixed | Keywords: File for download
------------------------+---------------------------------------------------
Changes (by simonp):

  * status: new => closed
  * resolution: => fixed

Comment:

Fixed in commit ed4078ae91c30100031a8df194a8edb656d9c33c

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1145#comment:2&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#1145: Added a new online resouce does not locate the id on file upload
------------------------+---------------------------------------------------
  Reporter: ianwallen | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: major | Milestone: v2.8.0
Component: General | Version: v2.8.0RC2
Resolution: fixed | Keywords: File for download
------------------------+---------------------------------------------------

Comment(by awalsh):

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

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1145#comment:3&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.