-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 10.10
-
Fix Version/s: 10.10-HF35
-
Component/s: Web UI
-
Release Notes Summary:Editing then saving a saved search works.
-
Tags:
-
Backlog priority:900
-
Team:UI
-
Story Points:3
Steps to reproduce:
- Log in to the WebUI
- Go to the search drawer
- Select a criterion (which matches some documents)
- Click on the "Save As" button, choose a name and save
- Select "Search Filters" to clear the form
- Select the saved search
- Choose a second criterion (which also matches some documents, better to visualize the filter is taken into account)
- Click on the "Save As" button, choose a name and save
Observe behavior: the popup remains open.
In the browser console, one can see this message
nuxeo-app.html:15703 POST http://localhost:8080/nuxeo/api/v1/search/saved 500 (anonymous) @ nuxeo-app.html:15703 http @ nuxeo-app.html:15691 execute @ nuxeo-app.html:16766 _doExecute @ nuxeo-app.html:24039 (anonymous) @ nuxeo-app.html:24020 Promise.then (async) execute @ nuxeo-app.html:24018 post @ nuxeo-app.html:56894 _saveSearch @ nuxeo-app.html:75393 handler @ nuxeo-app.html:2291 _fire @ nuxeo-app.html:7220 forward @ nuxeo-app.html:7615 click @ nuxeo-app.html:7578 _handleNative @ nuxeo-app.html:6998 :8080/nuxeo/ui/#!/search/default:1 Uncaught (in promise) {entity-type: "exception", status: 500, message: "java.lang.ClassCastException: org.nuxeo.ecm.core.s…st to org.nuxeo.ecm.core.schema.types.ComplexType"}entity-type: "exception"status: 500message: "java.lang.ClassCastException: org.nuxeo.ecm.core.schema.types.SimpleTypeImpl cannot be cast to org.nuxeo.ecm.core.schema.types.ComplexType"__proto__: Object Promise.then (async) _saveSearch @ nuxeo-app.html:75393 handler @ nuxeo-app.html:2291 _fire @ nuxeo-app.html:7220 forward @ nuxeo-app.html:7615 click @ nuxeo-app.html:7578 _handleNative @ nuxeo-app.html:6998
The rename action caused a HTTP 500 error with this response
{"entity-type":"exception","status":500,"message":"java.lang.ClassCastException: org.nuxeo.ecm.core.schema.types.SimpleTypeImpl cannot be cast to org.nuxeo.ecm.core.schema.types.ComplexType"}
In the server log, one can see this trace
ERROR [WebEngineExceptionMapper] java.lang.ClassCastException: org.nuxeo.ecm.core.schema.types.SimpleTypeImpl cannot be cast to org.nuxeo.ecm.core.schema.types.ComplexType java.lang.ClassCastException: org.nuxeo.ecm.core.schema.types.SimpleTypeImpl cannot be cast to org.nuxeo.ecm.core.schema.types.ComplexType at org.nuxeo.ecm.automation.core.util.ComplexTypeJSONDecoder.decodeList(ComplexTypeJSONDecoder.java:80) ~[nuxeo-automation-core-10.10-HF15.jar:?] at org.nuxeo.ecm.automation.core.util.ComplexTypeJSONDecoder.decodeList(ComplexTypeJSONDecoder.java:69) ~[nuxeo-automation-core-10.10-HF15.jar:?] at org.nuxeo.ecm.automation.core.util.DocumentHelper.setProperty(DocumentHelper.java:295) ~[nuxeo-automation-core-10.10-HF15.jar:?] at org.nuxeo.ecm.restapi.server.jaxrs.search.SearchObject.setSaveSearchParams(SearchObject.java:263) ~[nuxeo-search-rest-api-10.10.jar:?] at org.nuxeo.ecm.restapi.server.jaxrs.search.SearchObject.doSaveSearch(SearchObject.java:179) ~[nuxeo-search-rest-api-10.10.jar:?]
Expected behavior: the new search is saved without error