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

[BUG] Cardinality error when searching for certain string in blog #78

Open
lguariento opened this issue Dec 8, 2021 · 6 comments
Open

Comments

@lguariento
Copy link

From a blog page (https://exist-db.org/exist/apps/wiki/blogs/) searching for the string install (see here) in the upper-right box leads to a cardinality error:

<exception>
<path>/db/apps/wiki/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: config:entry-url-from-entry($entry as element()) item()*. Expected cardinality: exactly one, got 0. [at line 80, column 44, source: /db/apps/wiki/modules/search.xql] In function: config:entry-url-from-entry(element()) [80:15:/db/apps/wiki/modules/config.xqm] search:title(node(), map(*)) [-1:-1:/db/apps/wiki/modules/search.xql] templates:process-output(element(), map(*), item()*, element()) [211:9:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:call-by-introspection(element(), map(*), map(*), function(*)) [189:28:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:call(item(), element(), map(*)) [137:36:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process(node()*, map(*)) [237:13:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process-output(element(), map(*), item()*, element()) [211:9:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:call-by-introspection(element(), map(*), map(*), function(*)) [189:28:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:call(item(), element(), map(*)) [137:36:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process(node()*, map(*)) [148:81:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process(node()*, map(*)) [48:25:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] search:results(node(), map(*)) [-1:-1:/db/apps/wiki/modules/search.xql] templates:process-output(element(), map(*), item()*, element()) [211:9:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:call-by-introspection(element(), map(*), map(*), function(*)) [189:28:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:call(item(), element(), map(*)) [137:36:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process(node()*, map(*)) [237:13:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process-output(element(), map(*), item()*, element()) [211:9:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:call-by-introspection(element(), map(*), map(*), function(*)) [189:28:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:call(item(), element(), map(*)) [137:36:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process(node()*, map(*)) [148:81:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process(node()*, map(*)) [148:81:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process(node()*, map(*)) [148:81:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process(node()*, map(*)) [148:81:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process(node()*, map(*)) [148:81:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process(node()*, map(*)) [148:81:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process(node()*, map(*)) [428:17:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process-output(element(), map(*), item()*) [230:9:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process-output(element(), map(*), item()*, element()) [211:9:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:call-by-introspection(element(), map(*), map(*), function(*)) [189:28:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:call(item(), element(), map(*)) [137:36:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process(node()*, map(*)) [133:51:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:process(node()*, map(*)) [90:9:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql] templates:apply(node()+, function(*), map(*)?, map(*)?) [31:5:/home/existdb/exist-db.org/exist-distribution-5.1.1/etc/../data/expathrepo/shared-0.9.1/content/templates.xql]
</message>
</exception>
@lguariento
Copy link
Author

PS: it must be interpreting 'install' as a special instruction/string, because even with one 'l' (instal) it goes through without errors.

@joewiz
Copy link
Member

joewiz commented Dec 8, 2021

I think the difference is that there were hits for install but not for instal, so with the latter there was no hit processing, but in the former, there was a bug in the processing of the hits.

@lguariento
Copy link
Author

lguariento commented Dec 8, 2021

Yes, you may be right. Why just install though? Setup is fine.

@lguariento
Copy link
Author

Ah, I've found another one: no less than exist! https://exist-db.org/exist/apps/wiki/blogs/search.html?q=exist

@joewiz
Copy link
Member

joewiz commented Dec 8, 2021

The error involves a templating function config:entry-url-from-entry, so whether there's an error or not probably depends on the hits themselves and whether they conform to what this function expects.

@lguariento
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants