sfu-dhil / wilde

eXist/XQuery app for detecting copying in a collection of XHTML documents.
GNU General Public License v3.0
2 stars 9 forks source link

Publisher link in breadcrumb broken #127

Closed joeytakeda closed 3 years ago

joeytakeda commented 3 years ago

Describe the bug The link to the publisher in the breadcrumb menu for a report produces an error page:

To Reproduce Steps to reproduce the behavior:

  1. Go to any report (e.g. view.html?f=tsfca_4410)
  2. Click on the publisher in the breadcrumb menu ("The San Francisco Call"), which links to newspaper-details.html?publisher=The%20San%20Francisco%20Call
  3. See error

Expected behavior It should link to the publisher's page using the id, not the name: newspaper-details.html?publisher=u_tsfc_222

Screenshots (Relevant bit):

<path>/db/apps/wilde/modules/view.xql</path>
<message>exerr:ERROR XPTY0004: The actual cardinality for parameter 1 does not match the cardinality declared in the function's signature: document:publisher($node as node()) xs:string. Expected cardinality: exactly one, got 0. [at line 668, column 29, source: /db/apps/wilde/modules/app.xql] In function: document:publisher(node()) [668:29:/db/apps/wilde/modules/document.xql] app:parameter(node(), map(*), xs:string)[...]</message>