-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.3 GA
-
Component/s: Seam / JSF UI
In the relation tab, when searching for documents through the popup to link it to another document, if we use simple queotes in the search pattern, it raises an exception, for example with the pattern 'Test File'.
The error is:
2009-12-15 16:54:01,288 ERROR [javax.enterprise.resource.webcontainer.jsf.application] org.nuxeo.ecm.core.api.ClientException: Failed to execute query: org.nuxeo.ecm.core.query.QueryParseException: Syntax error: Invalid token <Test> at offset 49 in query: SELECT * FROM Document WHERE ecm:fulltext LIKE ''Test File'' AND ecm:mixinType != 'Folderish' AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND ecm:uuid != 'e915d23e-f1c5-43e2-bf79-278ff19ddda7'
javax.faces.el.EvaluationException: org.nuxeo.ecm.core.api.ClientException: Failed to execute query: org.nuxeo.ecm.core.query.QueryParseException: Syntax error: Invalid token <Test> at offset 49 in query: SELECT * FROM Document WHERE ecm:fulltext LIKE ''Test File'' AND ecm:mixinType != 'Folderish' AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND ecm:uuid != 'e915d23e-f1c5-43e2-bf79-278ff19ddda7'
The simple quotes have to be escaped.