Opened 12 years ago

Closed 12 years ago

#1152 closed defect (fixed)

subtemplate selector panel has namespaces hardcoded - doesn't work for profiles

Reported by: simonp Owned by: geonetwork-devel@…
Priority: major Milestone: v2.8.0
Component: General Version: v2.8.0RC2
Keywords: Cc:

Description

Cannot use subtemplate selector panel in new widgets editor to select a subtemplate for an element in a profile namespace eg. mcp

Attachments (1)

subtemplate_namespace_fix.patch (10.4 KB ) - added by simonp 12 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by simonp, 12 years ago

Namespaces added to element don't include the namespace of the profile element - because SubtemplateSelectionPanel.js has only this list of hardcoded ISO namespaces.

2012-11-10 00:34:52,789 ERROR [geonetwork.editoraddelement] - EditLib : Error parsing XML fragment <mcp:party xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gmx="http://www.isotc211.org/2005/gmx" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:gml="http://www.opengis.net/gml" xlink:href='http://plaja-hf.hba.marine.csiro.au:8080/geonetwork/srv/eng/subtemplate?uuid=urn:marine.csiro.au:person:180_person_organisation'/> 2012-11-10 00:34:52,793 ERROR [jeeves.service] - Exception when executing service 2012-11-10 00:34:52,793 ERROR [jeeves.service] - (C) Exc : java.lang.IllegalStateException: EditLib : Error when loading XML fragment, Error on line 1: The prefix "mcp" for element "mcp:party" is not bound. 2012-11-10 00:34:52,793 DEBUG [jeeves.service] - Raised exception while executing service <error id="error">M

<message>EditLib : Error when loading XML fragment, Error on line 1: The prefix "mcp" for element "mcp:party" is not bound.</message>M <class>IllegalStateException</class>M <stack>M

<at class="org.fao.geonet.kernel.EditLib" file="EditLib.java" line="345" method="addFragment" />M <at class="org.fao.geonet.services.metadata.AjaxEditUtils" file="AjaxEditUtils.java" line="180" method="applyChangesEmbedded" />M <at class="org.fao.geonet.services.metadata.EditUtils" file="EditUtils.java" line="169" method="updateContent" />

by simonp, 12 years ago

comment:2 by simonp, 12 years ago

Fix is to pass namespace string generated by SchemaManager through to SubtemplateSelectionPanel.js - patch attached does that - for review to be added to 2.8.x as this is critical for profile support.

comment:3 by simonp, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in commit 7818ea9ab1ec9e5d1c2a2b847cb3d0d4ebea93b5

Note: See TracTickets for help on using tickets.