seiif / share-extras

Automatically exported from code.google.com/p/share-extras
0 stars 0 forks source link

[ExecuteScriptAction] Error on 4.0, in non-english alfresco install #72

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Bootstrap Alfresco in another language (like french), so that Data 
Dictionary will have a different name
2. Go on a document to run 'execute script action'
3. the dialog popup shows an error message : "Could not load dialog template 
from '/share/service/extras/modules/documentlibrary/execute-script'."

Stack :
- windows 7
- Alfresco 4.0 Enterprise
- MySQL 5.5

Reason :
Having looked at the source code, it looks like the following REST call 
(execute-script.get.js) is not working :
#code
var json = 
remote.call("/slingshot/doclib/doclist/documents/node/alfresco/company/home/Data
%20Dictionary/Scripts"),
#/code

It's because the path company/home/Data%20Dictionary/Scripts can't be resolved, 
and the result of the call is always a "404, not found".
The call is working, in a french install (Data Dictionary being "Dictionnaire 
de données"), using :
http://localhost:8080/alfresco/service/slingshot/doclib/doclist/documents/node/a
lfresco/company/home/Dictionnaire%20de%20donn%C3%A9es/Scripts

I think we need to find a way to properly make the remote call, independantly 
from the bootstrap language.

Logs : 
11:02:14,784 ERROR [freemarker.runtime] Template processing error: "Expected 
collection or sequence. scripts evaluated instead to 
freemarker.ext.beans.StringModel on line 12, column 23 in 
org/alfresco/extras/modules/documentlibrary/execute-script.get.html.ftl."

Expected collection or sequence. scripts evaluated instead to 
freemarker.ext.beans.StringModel on line 12, column 23 in 
org/alfresco/extras/modules/documentlibrary/execute-script.get.html.ftl.
The problematic instruction:
----------
==> list scripts as s [on line 12, column 16 in 
org/alfresco/extras/modules/documentlibrary/execute-script.get.html.ftl]
----------

Java backtrace for programmers:
----------
freemarker.template.TemplateException: Expected collection or sequence. scripts 
evaluated instead to freemarker.ext.beans.StringModel on line 12, column 23 in 
org/alfresco/extras/modules/documentlibrary/execute-script.get.html.ftl.
    at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:136)
    at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:190)
    at freemarker.core.Environment.visit(Environment.java:428)
    at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
    at freemarker.core.Environment.visit(Environment.java:221)
    at freemarker.core.MixedContent.accept(MixedContent.java:92)
    at freemarker.core.Environment.visit(Environment.java:221)
    at freemarker.core.Environment.process(Environment.java:199)
    at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:171)
    at org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:779)
    at org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)
    at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)
    at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:70)
    at org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:239)
    at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:372)
    at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
    at org.springframework.extensions.webscripts.servlet.mvc.WebScriptView.renderMergedOutputModel(WebScriptView.java:99)
    at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
    at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
    at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
    at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
    at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:619)
11:02:14,810 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] 
Exception from executeScript - redirecting to status template error: 02300003 
Failed to process template 
org/alfresco/extras/modules/documentlibrary/execute-script.get.html.ftl
org.springframework.extensions.webscripts.WebScriptException: 02300003 Failed 
to process template 
org/alfresco/extras/modules/documentlibrary/execute-script.get.html.ftl
    at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:175)
    at org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:779)
    at org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)
    at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)
    at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:70)
    at org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:239)
    at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:372)
    at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
    at org.springframework.extensions.webscripts.servlet.mvc.WebScriptView.renderMergedOutputModel(WebScriptView.java:99)
    at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
    at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
    at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
    at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
    at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:619)
Caused by: freemarker.template.TemplateException: Expected collection or 
sequence. scripts evaluated instead to freemarker.ext.beans.StringModel on line 
12, column 23 in 
org/alfresco/extras/modules/documentlibrary/execute-script.get.html.ftl.
    at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:136)
    at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:190)
    at freemarker.core.Environment.visit(Environment.java:428)
    at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
    at freemarker.core.Environment.visit(Environment.java:221)
    at freemarker.core.MixedContent.accept(MixedContent.java:92)
    at freemarker.core.Environment.visit(Environment.java:221)
    at freemarker.core.Environment.process(Environment.java:199)
    at org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:171)
    ... 39 more

Original issue reported on code.google.com by romain.d...@gmail.com on 30 Mar 2012 at 9:06

GoogleCodeExporter commented 8 years ago

Original comment by will.abson on 6 Aug 2012 at 6:05

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1258.

Original comment by will.abson on 8 Aug 2012 at 5:41

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1260.

Original comment by will.abson on 8 Aug 2012 at 6:03