AnsweredAssumed Answered

Web Studio Create website Based on the following Issue

Question asked by pp20218 on Jul 22, 2010
Hi All,

I am working with Alfresco web studio with labs 3c version. After successfully login to the web studio I have the following issues.

When I click create a new web site , "Based on the Following" drop down is not loading. 
I use the firefox debug and saw the below things

Alfresco     Web Script Status 500 - Internal Error
The Web Script /studio/service/api/prebuilt/list has responded with a status of 500 - Internal Error.
500 Description:    An error inside the HTTP server which prevented it from fulfilling the request.

Message:   Failed to load script '/web-studio/api/prebuilt/list.get.js (in classpath store file:/opt/Alfresco/tomcat/webapps/studio/WEB-INF/classes/alfresco/webscripts)': TypeError: Cannot read property "results" from null (AlfrescoScript#51)
   
Exception:   org.mozilla.javascript.EcmaError - TypeError: Cannot read property "results" from null (AlfrescoScript#51)
   
   org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3350)
   org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3340)
   org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3356)
   org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3375)
   org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3388)
   org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1362)
   org.mozilla.javascript.gen.c5._c4(AlfrescoScript:51)
   org.mozilla.javascript.gen.c5.call(AlfrescoScript)
   org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
   org.mozilla.javascript.gen.c5._c2(AlfrescoScript:19)
   org.mozilla.javascript.gen.c5.call(AlfrescoScript)
   org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
   org.mozilla.javascript.gen.c5._c0(AlfrescoScript:61)
   org.mozilla.javascript.gen.c5.call(AlfrescoScript)
   org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
   org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
   org.mozilla.javascript.gen.c5.call(AlfrescoScript)
   org.mozilla.javascript.gen.c5.exec(AlfrescoScript)
   org.mozilla.javascript.Context.evaluateString(Context.java:1196)
   org.alfresco.web.scripts.PresentationScriptProcessor.executeScriptImpl(PresentationScriptProcessor.java:234)
   org.alfresco.web.scripts.PresentationScriptProcessor.executeScript(PresentationScriptProcessor.java:115)
   org.alfresco.web.scripts.AbstractWebScript.executeScript(AbstractWebScript.java:759)
   org.alfresco.web.scripts.DeclarativeJSONWebScript.execute(DeclarativeJSONWebScript.java:103)
   org.alfresco.web.scripts.PresentationContainer.executeScript(PresentationContainer.java:53)
   org.alfresco.web.scripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:188)
   org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:240)
   org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139)
   org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
   org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
   org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
   org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
   org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
   java.lang.Thread.run(Thread.java:619)
   
Exception:   org.alfresco.web.scripts.WebScriptException - TypeError: Cannot read property "results" from null (AlfrescoScript#51)
   
   org.alfresco.web.scripts.PresentationScriptProcessor.executeScriptImpl(PresentationScriptProcessor.java:239)
   
Exception:   org.alfresco.web.scripts.WebScriptException - Failed to load script '/web-studio/api/prebuilt/list.get.js (in classpath store file:/opt/Alfresco/tomcat/webapps/studio/WEB-INF/classes/alfresco/webscripts)': TypeError: Cannot read property "results" from null (AlfrescoScript#51)
   
   org.alfresco.web.scripts.PresentationScriptProcessor.executeScript(PresentationScriptProcessor.java:120)
   
Server:   Alfresco Labs v3.0.0 (c 1342) schema 1,000
Time:   Jul 22, 2010 1:21:19 PM
   
Diagnostics:   Inspect Web Script (web-studio/api/prebuilt/list.get)


Can anyone help me what Might be the reason and Why its not able to load the web script?

Also in prebuilt.js
function getRemoteSites(endpointId, uri)
{
   var connector = remote.connect(endpointId);
   
   var feed = connector.get(uri);
   model.feed = feed;
   
   var obj = eval('(' + feed + ')');
   
   var sites = { };
   
   for(var key in obj.results)
   {
      if(key != null && key != "none")
      {
         var site = obj.results[key];
         sites[key] = site;
      }
   }

   
   return sites;
}

If I comment out the above code marked in red.I am getting the drop down with create with Blank site. But i m not getting the green starter stuffs and other.

Pls help.

Regards
PP

Outcomes