click on searchterm in kwic gives stacktrace
Searching for a term shows me a nice kwic view. The term is shown as a link. When I click this link (for example: http://localhost:8080/exist/apps/tdb/works/Nij/fabryk01.xml?root=1.3.1&action=search&view=div&odd=teipublisher.odd#1.3.1.1.139) this produces a stacktrace, snippet:
2017-03-20 14:13:38,651 [qtp1128266449-67] ERROR (DeferredFunctionCall.java [hasMany]:170) - Exception in deferred function: exerr:ERROR XPTY0004: The actual cardinality for parameter 2 does not match the cardinality declared in the function's signature: pages:get-content($config as map, $div as element()) item()*. Expected cardinality: exactly one, got 0. [at line 231, column 46, source: /db/apps/tdb/modules/lib/pages.xql]
In function:
pages:get-content(map, element()) [231:46:/db/apps/tdb/modules/lib/pages.xql]
pages:view(node(), map, xs:string) [219:18:/db/apps/tdb/modules/lib/pages.xql]