[Push Publishing] Lookup of unique contents with special characters on their fields' values fail
Current Behavior
Upon lookup of unique contents once they're pushed, any content with special character/spaces on its unique fields' values will fail, making the whole bundle to fail.
Possible Solution
Escape properly all special characters, and wrap the field's value under double quotes if it has spaces on its value.
Known Workarounds
None.
Steps to Reproduce (for bugs)
- Create a content type called "Test".
- Add a "Title" text field. This one MUST be indexed, user searchable AND unique.
- Create a content called "Test: This is a test".
- Push it to another environment.
Stacktrace:
https://gist.github.com/joseorsini/6aa5dd505fe8c45ca2897dbae013e99c
As the Gist shows above, the generated query that attempts to look for unique contents is
+structurename:medicalpolicy +languageid:1 +(medicalpolicy.title:telehealth: real-time interactive telemedicine services )
Which has spaces and special characters un-escaped. Original content title is "Telehealth: Real-time Interactive Telemedicine Services" and belongs to a content type called "Medical Policy".
Context
Reported by customer: https://dotcms.zendesk.com/agent/tickets/94957
Your Environment
- dotCMS version used: 4.2.2.
- Browser Name and version: Any Browser.
- Operating System and version: Any OS.
- Application Server and version: Any supported application server.
- Java Brand and version: Any Java version.
- Database and version: Any DB.
- Application module (if apply): N/A.
PR EE: https://github.com/dotCMS/enterprise-2.x/pull/575
Passed QA.
MacOS 10.10.10 / Postgres 9.6 / Chrome v54.0.2840.98 / Tomcat 8 / Java 8
Failed QA Still getting same error in logs when pushing content called "Test: This is a test" https://gist.github.com/shaydotcms/d9ec7a046e1731a5ef66447c8ba0a00a