Adding a second parameter to a page provider
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2020 06:01 PM
Hello,
I am trying to modify the page provider used by the top search bar by adding a second parameter. I have followed the example in this post.
The use case from the post is pretty much exactly what I want and I've tried replicating it, but I run into this error.
2020-07-07T16:42:07,985 WARN [http-nio-0.0.0.0-8080-exec-10] [org.nuxeo.ecm.platform.query.nxql.CoreQueryDocumentPageProvider] Failed to execute query: SELECT * FROM Document WHERE ecm:fulltext LIKE 'abs*%' AND ecm:isProxy = 0 AND ecm:mixinType = 'Folderish' AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0 AND ecm:path STARTSWITH ", Syntax error: Invalid token <null> at offset -1
org.nuxeo.ecm.core.query.QueryParseException: Failed to execute query: SELECT * FROM Document WHERE ecm:fulltext LIKE 'abs*%' AND ecm:isProxy = 0 AND ecm:mixinType = 'Folderish' AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0 AND ecm:path STARTSWITH ", Syntax error: Invalid token <null> at offset -1
at org.nuxeo.ecm.core.query.sql.parser.parser.parseFailed(parser.java:519) ~[nuxeo-core-query-10.10-HF21.jar:?]
at org.nuxeo.ecm.core.query.sql.parser.parser.unrecovered_syntax_error(parser.java:510) ~[nuxeo-core-query-10.10-HF21.jar:?]
at java_cup.runtime.lr_parser.parse(lr_parser.java:601) ~[java-cup-0.11a.jar:?]
(I've also included the entire error message as a file.)
Here is the page provider.
<extension target="org.nuxeo.ecm.platform.query.api.PageProviderService" point="providers">
<coreQueryPageProvider name="TEST_PP">
<pattern quoteParameters="false" escapeParameters="true">
SELECT * FROM Document WHERE ecm:fulltext LIKE '?%' AND ecm:isProxy = 0 AND
ecm:mixinType = 'Folderish' AND ecm:mixinType != 'HiddenInNavigation'
AND ecm:isVersion = 0 AND ecm:isTrashed = 0 AND ecm:path STARTSWITH '?'
</pattern>
<parameter>#{documentManager.getParentDocument(currentDocument.parentRef).path}</parameter>
<pageSize>50</pageSize>
</coreQueryPageProvider>
</extension>
I have also tried just putting a plain string in the parameter node like this
<parameter>/base</parameter>
And I've also come across the same error.
Please let me know what I am doing incorrectly or if there is any more information needed to help solving this issue.
0 REPLIES 0
