Esri / geoportal-server

Geoportal Server is a standards-based, open source product that enables discovery and use of geospatial resources including data and services.
https://gptogc.esri.com/geoportal
Apache License 2.0
244 stars 149 forks source link

Additional Options and Browse page are not working #242

Closed gcampanile closed 7 years ago

gcampanile commented 8 years ago

The Additional options button on Search page is not working and so is the Browse page, where only the left part of the tree is displayed. I tried the http://gptogc.esri.com version and is not working either.

I think there's somthing wrong with the frmSearchPage parameter in criteria.jsp, but up to now I could not make it work.

gcampanile commented 8 years ago

Additional info: it's not working with any of the jsapi 3.x but it works with 2.x ones. At that point though there are other javascript functions missing, Gianni

mhogeweg commented 8 years ago

what browser? what are the errors on gptogc.esri.com you see in the console? I'm seeing normal behavior:

image

gcampanile commented 8 years ago

I've tried on Firefox, Chrome, IE + Mac with Safari. After your post I tried to switch the browser to english and everything works! I don't know wether it's a problem only with italian or with any other language, it seems to be an issue in init.js. Can you try setting a different language ?

gcampanile commented 8 years ago

Found the problem: the catalog\skins\lookAndFeel-jsp has the following dojo directive: <script type="text/javascript"> djConfig = {parseOnLoad: true, locale: 'en'}; </script> This, in JS 3.x, imposes a language thus creating parsing problems when the browser is not in the same language. The line should be: <script type="text/javascript"> djConfig = {parseOnLoad: true}; </script>

I'll make some more tests, but up to now everything seems to work fine.

Gianni

marcelsip commented 7 years ago

I had the same problem with czech locale and Gianni's workaround helped, but not in all cases: opening Geoportal with default czech locale using Chrome switched to english led to the same result - not working Additional options button. Setting the locale dynamically seems to solve this: <script type="text/javascript"> djConfig = {parseOnLoad: true, locale: '<%=request.getLocale().getLanguage()%>'}; </script>