Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-22533

suggestion does not work with empty field after 7.10 HF23 / 8.10 HF03 installation

    XMLWordPrintable

    Details

      Description

      1. install 7.10-HF22
      2. in Studio create a page provide like the following:
        <extension target="org.nuxeo.ecm.platform.query.api.PageProviderService" point="providers">
            <coreQueryPageProvider name="suggestion_testempty">
                  <pattern quoteParameters="false" escapeParameters="true">
             			select * from Document where dc:title ILIKE '?%' AND ecm:currentLifeCycleState != 'deleted' 
                  </pattern>
                  <pageSize>5</pageSize>
            </coreQueryPageProvider>
        </extension>
        
      3. add a multi-valued field using the Multiple Document Suggestion widget pointing to the page provider above:
        • Minimum characters must be 0
        • Document page provider name must be suggestion_testempty
      4. Synchronize the project
      5. create a test document and click the suggestion field
        # this lists the documents available

      Now replay the same scenario with HF23 installed and this shows the following in server.log:

      ****** chain ******
      Name: operation
      Exception: OperationException
      Caught error: Failed to execute query: select * from Document where dc:title ILIKE ', Syntax error: Invalid token <null> at offset -1
      Caused by: null
      ****** Hierarchy calls ******
      	org.nuxeo.ecm.automation.core.operations.services.DocumentPageProviderOperation
      
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:236)
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:108)
      	at org.nuxeo.ecm.automation.seam.operations.RunOperationInSeam.runChain(RunOperationInSeam.java:86)
      	at org.nuxeo.ecm.automation.seam.operations.RunOperationInSeam.run(RunOperationInSeam.java:70)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:157)
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:170)
      	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:128)
      	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:114)
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:212)
      	... 89 more
      Caused by: org.nuxeo.ecm.automation.OperationException: Failed to execute query: select * from Document where dc:title ILIKE ', Syntax error: Invalid token <null> at offset -1
      	at org.nuxeo.ecm.automation.core.operations.services.DocumentPageProviderOperation.run(DocumentPageProviderOperation.java:255)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:157)
      	at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:170)
      	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:128)
      	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:114)
      	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:212)
      	... 101 more
      

      Looking at the comma in the error, this has likely been introduced in fix from NXP-21506.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 15 minutes
                  15m