Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add node identifier parameter for xlst processing. Required in skin.xsl #7454

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

josegar74
Copy link
Member

@josegar74 josegar74 commented Oct 24, 2023

Follow up of #7015, identified in GeoNetwork 3.12.x

In certain setups, accessing the no JS search page: http://localhost:8080/geonetwork/srv/search returns an error 400:

Error on line 71 of skin.xsl:
  XTTE0790: An empty sequence is not allowed as the second argument of geonet:updateUrlPlaceholder()
2023-10-24 09:48:06,491 ERROR [geonetwork] - An empty sequence is not allowed as the second argument of geonet:updateUrlPlaceholder()
; SystemID: file:///opt/geonetwork/xslt/ui-search/../common/../skin/default/skin.xsl; Line#: 71; Column#: -1
net.sf.saxon.trans.XPathException: An empty sequence is not allowed as the second argument of geonet:updateUrlPlaceholder()

The class that applies the xslt transformation doesn't add the nodeId field. It's unclear as local testing doesn't produce the previous error (same missing value).

This change, adds the missing field to be processed.

In GeoNetwork 4.x, the search no JS page is not implemented (

private Element query(Map<String, String> queryFields, HttpServletRequest request) {
ApplicationContext applicationContext = ApplicationContextHolder.get();
EsSearchManager searchMan = applicationContext.getBean(EsSearchManager.class);
ServiceContext context = ApiUtils.createServiceContext(request);
// TODOES this is the proxy
throw new NotImplementedException("Not implemented in ES");
), but the change will be required if at some moment is implemented.

Checklist

  • I have read the [contribution guidelines](https://github.com/geonetwork/core-geonetwork/blob/main/CONTRIBUTING.md
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests)
  • User documentation provided for new features or enhancements in mannual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@josegar74 josegar74 merged commit abb4de0 into geonetwork:main Nov 6, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants