Uploaded image for project: 'Repository'
  1. Repository
  2. REPO-855

REGRESS - Retrieve preference with preferenceName is not working for >5.2.x

    Details

    • Bug Priority:
      Category 1
    • Work Funnel:
      Feature
    • Sprint:
      Zulu Sprint 1, Zulu Sprint 2
    • Story Points:
      3
    • Template:

      Description

      For the endpoint
      GET /people/{personId}/preferences/{preferenceName}
      you can not use a valid id which contains slashes anymore. On an Alfresco 5.1 server it was indeed possible.
      The problem obvious is that the id or preferenceName can continue a slash / like
      org.alfresco.ext.documents.favourites.workspace://SpacesStore/35f22c52-d91f-441f-a882-c286425934a8.createdAt
      How I told for 5.1 servers it was possible to do it but in the developer version it is not possible anymore. So make the same steps from the How to for the newest branch version RETURN-OF-THE-API and with an older version like 5.1 .

      Updated
      How to:
      1) Make a favorite to a node id. That should create a preference this kind of:

      "entry": {
          "id": "org.alfresco.ext.documents.favourites.workspace://SpacesStore/35f22c52-d91f-441f-a882-c286425934a8.createdAt",
          "value": "2016-05-18T15:06:20.970Z"
        }
      

      2) Go on http://localhost:8080/api-explorer/#!/people/getPreferences and use - me - for personId
      3) Choose an id with contains // like this one from step 1.
      4) Go on http://localhost:8080/api-explorer/#!/people/getPreference
      5) Use - me - for personId and the preference id from step 3

      Expected result:
      A valid preference result like on the older versions:

      {
        "entry": {
          "id": "org.alfresco.ext.documents.favourites.workspace://SpacesStore/03e2223d-a8a9-417c-b91b-248512bde81a.createdAt",
          "value": "2016-05-18T15:06:20.970Z"
        }
      }
      

      Actual result:

      {
        "error": {
          "errorKey": "Unable to locate resource resource for :people /SpacesStore/35f22c52-d91f-441f-a882-c286425934a8.createdAt",
          "statusCode": 404,
          "briefSummary": "05210001 Unable to locate resource resource for :people /SpacesStore/35f22c52-d91f-441f-a882-c286425934a8.createdAt",
          "stackTrace": "For security reasons the stack trace is no longer displayed, but the property is kept for previous versions.",
          "descriptionURL": "https://api-explorer.alfresco.com"
        }
      }
      

      Stack:

      2016-06-23 08:30:05,327  ERROR [extensions.webscripts.AbstractRuntime] [http-bio-8080-exec-40] Exception from executeScript: 05230282 Unable to locate resource resource for :people /SpacesStore/06486e2a-a744-422a-9daa-eba444d90dc7.createdAt
       org.alfresco.rest.framework.core.exceptions.NotFoundException: 05230282 Unable to locate resource resource for :people /SpacesStore/06486e2a-a744-422a-9daa-eba444d90dc7.createdAt
      	at org.alfresco.rest.framework.core.ResourceLookupDictionary.locateRelationPropertyResource(ResourceLookupDictionary.java:80)
      	at org.alfresco.rest.framework.core.ResourceLookupDictionary.locateResource(ResourceLookupDictionary.java:140)
      	at org.alfresco.rest.api.PublicApiDeclarativeRegistry.getResourceWithMetadataOrNull(PublicApiDeclarativeRegistry.java:231)
      	at org.alfresco.rest.api.PublicApiDeclarativeRegistry.findWebScript(PublicApiDeclarativeRegistry.java:121)
      	at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:165)
      	at org.alfresco.repo.web.scripts.TenantWebScriptServlet.service(TenantWebScriptServlet.java:82)
      	at org.alfresco.rest.api.PublicApiWebScriptServlet.service(PublicApiWebScriptServlet.java:62)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:75)
      	at sun.reflect.GeneratedMethodAccessor593.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:132)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at com.sun.proxy.$Proxy308.doFilter(Unknown Source)
      	at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:89)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
      	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
      	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Structure

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mmuller Martin Muller
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Structure Helper Panel