Opened 12 years ago

Closed 12 years ago

#1228 closed defect (fixed)

xml.metadata.status.values.list was replaced by xml.info?type=status / search by status broken

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

Description

In 7caf977c2a3 xml.metadata.status.values.list was added as the url to call to populate data.StatusStore. That service was moved to xml.info?type=status in 474437d, but Catalogue.js still refers to xml.metadata.status.values.list, leading to errors in the log :

{[ 2013-02-21 09:04:34,388 ERROR [jeeves.service] - Service not found : xml.metadata.status.values.list 2013-02-21 09:04:34,389 DEBUG [jeeves.service] - Raised exception while executing service <error id="service-not-found">

<message>Service not found</message> <class>ServiceNotFoundEx</class>

....

<object>xml.metadata.status.values.list</object> <request>

<language>fre</language> <service>xml.metadata.status.values.list</service>

</request>

</error> }}

a simple fix would be the following : {{ diff --git a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/Catalogue.js b/web-client/src/main/resources/apps/js/GeoNetwor index bfd3ea4..9e43337 100644 --- a/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/Catalogue.js +++ b/web-client/src/main/resources/apps/js/GeoNetwork/lib/GeoNetwork/Catalogue.js @@ -351,7 +351,7 @@ GeoNetwork.Catalogue = Ext.extend(Ext.util.Observable, {

xmlError: serviceUrl + 'xml.main.error', searchKeyword: serviceUrl + 'xml.search.keywords', getThesaurus: serviceUrl + 'xml.thesaurus.getList',

  • getStatus: serviceUrl + 'xml.metadata.status.values.list',

+ getStatus: serviceUrl + 'xml.info?type=status',

getKeyword: serviceUrl + 'xml.keyword.get', searchCRS: serviceUrl + 'crs.search', getCRSTypes: serviceUrl + 'crs.types',

}}

but even with that, when logged as admin the StatusStore stays empty after store.load() in SearchFormTools.js:getStatusField() - so there might be another issue there. Using firebug, getLabel() in StatusStore is not even called.

Attachments (1)

fix-1228.diff (1.8 KB ) - added by landry 12 years ago.
fix getStatus url & StatusStore definition

Download all attachments as: .zip

Change History (4)

comment:1 by landry, 12 years ago

changing record: 'record' to record: 'status' in data/StatusStore.js at least allows the store to be populated with labels, since the returned xml contains <status> items - not <record> items. Yet, the search by status doesnt work, and i suspect because it cant find the id which is an xml property of <status> and not a full-fledged xml child element.

comment:2 by landry, 12 years ago

I looked at CategoryStore.js and finally found out that mapping had to be set for id field for it to work - with that patch, i can search by status as admin and the records are properly returned

by landry, 12 years ago

Attachment: fix-1228.diff added

fix getStatus url & StatusStore definition

comment:3 by simonp, 12 years ago

Milestone: v2.9.0v2.8.1
Resolution: fixed
Status: newclosed

Fixed in commits 294a922b6db13a6a8d6ec1fffd2a9b91038c4d85 and 694675febd99cd4238a3d0422b38548698bf71c0

Note: See TracTickets for help on using tickets.