An error has occurred

An error has been generated by the application.

exerr:ERROR XPTY0004: The actual cardinality for parameter 1 does not match the cardinality declared in the function's signature: app:doc-context($collection as xs:string, $current as xs:string) item()*. Expected cardinality: exactly one, got 0. [at line 654, column 36, source: /db/apps/mrp/modules/app.xql]
In function:
	app:doc-context(xs:string, xs:string) [654:19:/db/apps/mrp/modules/app.xql]
	app:XMLtoHTML(node(), map(*), xs:string?) [-1:-1:/db/apps/mrp/modules/app.xql]
	templates:process-output(element(), map(*), item()*, element()) [211:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:call-by-introspection(element(), map(*), map(*), function(*)) [189:28:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:call(item(), element(), map(*)) [137:36:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [148:81:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [148:81:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [148:81:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [148:81:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [428:17:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process-output(element(), map(*), item()*) [230:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process-output(element(), map(*), item()*, element()) [211:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:call-by-introspection(element(), map(*), map(*), function(*)) [189:28:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:call(item(), element(), map(*)) [145:37:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [133:51:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:process(node()*, map(*)) [90:9:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
	templates:apply(node()+, function(*), map(*)?, map(*)?) [45:5:/exist/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]