cancel
Showing results for 
Search instead for 
Did you mean: 

nightly build, share 'create rules' - fail on migrated site

gnyce
Champ in-the-making
Champ in-the-making
I'm not sure anyone wants bug-reports on nightly builds - I certainly can file them, if someone suggests - but thought this was interesting.  If I use a nightly build - say, the one from 27 May (linux), install and create a new site, I am able to load the Share interface/Document Library/Create New Rule window, no problem.

If, however, I then migrate/load up an existing site (upgrade of 3.3 site to 3.3G), full re-indexing, etc…  I am not able to load the create-rule window.  I get an "Internal Server Error".  Thought it might have something to do with the site itself, so created a new site (in the migrated installation), but same problem.  Pasting alfresco.log entry below.  Wondering - is it possible that there is a missing step in a migrated site??
______________

11:10:49,788 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 04280005 Failed to load script 'classpath*:alfresco/site-webscripts/org/alfresco/components/rules/config/rule-config-condition.get.js': 04280004 TypeError: Cannot call method "sort" of undefined (file:/opt/alf32/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/rules/config/rule-config-condition.get.js#140)
org.springframework.extensions.webscripts.WebScriptException: 04280005 Failed to load script 'classpath*:alfresco/site-webscripts/org/alfresco/components/rules/config/rule-config-condition.get.js': 04280004 TypeError: Cannot call method "
sort" of undefined (file:/opt/alf32/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/rules/config/rule-config-condition.get.js#140)
        at org.springframework.extensions.webscripts.processor.JSScriptProcessor.executeScript(JSScriptProcessor.java:182)
        at org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:971)
        at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)
        at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:69)
        at org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:203)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:319)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:177)
        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:1060)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
        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:852)
        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: org.springframework.extensions.webscripts.WebScriptException: 04280004 TypeError: Cannot call method "sort" of undefined (file:/opt/alf32/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/rules/config/rule-config-condition.get.js#140)
        at org.springframework.extensions.webscripts.processor.JSScriptProcessor.executeScriptImpl(JSScriptProcessor.java:302)
        at org.springframework.extensions.webscripts.processor.JSScriptProcessor.executeScript(JSScriptProcessor.java:178)
        … 38 more
Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot call method "sort" of undefined (file:/opt/alf32/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/rules/config/rule-config-condition.get.js#140)
        at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3350)
        at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3340)
        at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3356)
        at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3375)
        at org.mozilla.javascript.ScriptRuntime.undefCallError(ScriptRuntime.java:3394)
        at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2026)
        at org.mozilla.javascript.gen.c30._c5(file:/opt/alf32/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/rules/config/rule-config-condition.get.js:140)
        at org.mozilla.javascript.gen.c30.call(file:/opt/alf32/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/rules/config/rule-config-condition.get.js)
        at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
        at org.mozilla.javascript.gen.c30._c9(file:/opt/alf32/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/rules/config/rule-config-condition.get.js:273)
        at org.mozilla.javascript.gen.c30.call(file:/opt/alf32/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/rules/config/rule-config-condition.get.js)
        at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
        at org.mozilla.javascript.gen.c30._c0(file:/opt/alf32/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/rules/config/rule-config-condition.get.js:397)
        at org.mozilla.javascript.gen.c30.call(file:/opt/alf32/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/rules/config/rule-config-condition.get.js)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
        at org.mozilla.javascript.gen.c30.call(file:/opt/alf32/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/rules/config/rule-config-condition.get.js)
        at org.mozilla.javascript.gen.c30.exec(file:/opt/alf32/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/rules/config/rule-config-condition.get.js)
        at org.springframework.extensions.webscripts.processor.JSScriptProcessor.executeScriptImpl(JSScriptProcessor.java:292)
        … 39 more
6 REPLIES 6

slynch
Champ in-the-making
Champ in-the-making
I had the same problem.  Check this out:
https://issues.alfresco.com/jira/browse/ALF-2715

The patch worked for me.  Note you'll have to register and log in to JIRA to be able to see the download link.

gnyce
Champ in-the-making
Champ in-the-making
Thank you slynch… seems to work here as well.  Appreciate it, didn't think to search JIRA as this was a nightly…. 

regards,
greg

nimbus58
Champ in-the-making
Champ in-the-making
Hello,

I have the same problem and got myself the patch but, … what do I do with it?

Appreciate any help, thanks

gnyce
Champ in-the-making
Champ in-the-making
you can patch the file, or edit it manually… to do manually, find and backup the rule.lib.ftl file.  Then edit it… go to lines 141 like it indicates… the line that has a "-" at the beginning is removed, the line that has a "+" at the beginning is added.  Basically, you are just moving two lines around.

nimbus58
Champ in-the-making
Champ in-the-making
Thanks Gnyce, that did the trick!

rays
Confirmed Champ
Confirmed Champ
I've applied the patch manually apparently successfully in 3.3g CE as the Create Rule page now renders….nearly.

Strangely, the rendered page is missing the "Create" "Create and Create Another" and "Cancel" buttons at the bottom of the page (as shown on http://robinsontechnology.com/blog/2010/05/05/content-rules-in-alfresco-share-33/ ) terminating at "If error occurs run script" selection button.

Is anyone else seeing this problem? Can someone point me to where and how I can apply the solution to this?

Thanks, in advance.