05-26-2017 11:40 AM
Hi all,
I'm using Alfresco 4.2f and I can't add a resource using the UIContentSelector in the StartWorkflowWizard page with every workflow. When I try to hit the search button the result box remains empty.
05-26-2017 11:44 AM
I have put the question here because I have already found the solution and I wanted to share it.
The problems is in the class org.alfresco.web.ui.repo.component.UIContentSelector that is building the query and in particular it is missing to escape double quotes around the search term, so the resultig query is like this:
... +@\{http\://www.alfresco.org/model/content/1.0\}name:"*SEARCH-TERM*"
So you have to modify the method getAvailableOptions and substitute this line (in my version is row 358):
query.append(":\"*" + safeContains + "*\"");
With this:
query.append(":\\\"*" + safeContains + "*\\\"");
05-26-2017 11:44 AM
I have put the question here because I have already found the solution and I wanted to share it.
The problems is in the class org.alfresco.web.ui.repo.component.UIContentSelector that is building the query and in particular it is missing to escape double quotes around the search term, so the resultig query is like this:
... +@\{http\://www.alfresco.org/model/content/1.0\}name:"*SEARCH-TERM*"
So you have to modify the method getAvailableOptions and substitute this line (in my version is row 358):
query.append(":\"*" + safeContains + "*\"");
With this:
query.append(":\\\"*" + safeContains + "*\\\"");
Explore our Alfresco products with the links below. Use labels to filter content by product module.