I get this error when I click the "TEI" source button
HTTP ERROR 500
Problem accessing /exist/apps/srophe/person/44/tei. Reason:
Server Error
Caused by:
javax.servlet.ServletException: An error occurred while processing request to /exist/apps/srophe/person/44/tei: exerr:ERROR XPTY0004: The actual cardinality for parameter 1 does not match the cardinality declared in the function's signature: root($arg as node()?) node()?. Expected cardinality: zero or one, got 2. [at line 330, column 10, source: /db/apps/srophe/modules/rest.xqm]
In function:
api:get-tei(item()) [304:29:/db/apps/srophe/modules/rest.xqm]
api:get-page(xs:string?, xs:string?, xs:string, item()) [-1:-1:/db/apps/srophe/modules/rest.xqm]
at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:378)
I get this error when I click the "TEI" source button