AnsweredAssumed Answered

Selecting discussion gives 500 error & exception

Question asked by stevenmac2 on Aug 23, 2010
Latest reply on Aug 24, 2010 by stevenmac2
I attempted to use the Discussion option and received the following error:

(Updated) - Seems the same error is also impacting the Blog link - unable to open or use that one as well.  Any ideas about this? way to fix?

An error has occured in the Share component: /share/service/components/discussions/toolbar.
It responded with a status of 500 - Internal Error.
Error Code Information: 500 - An error inside the HTTP server which prevented it from fulfilling the request.
Error Message: 07230007 Failed to load script 'classpath*:alfresco/site-webscripts/org/alfresco/components/discussions/toolbar.get.js': 07230006 SyntaxError: syntax error (file:/C:/Alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/discussions/toolbar.get.js#15(eval)#52)
Server: Alfresco Spring WebScripts - v1.0.0 (Milestone 3 357) schema 1,000
Time: Aug 23, 2010 6:18:29 PM
Click here to view full technical information on the error.
Exception: org.mozilla.javascript.EcmaError - SyntaxError: syntax error (file:/C:/Alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/discussions/toolbar.get.js#15(eval)#52)
org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3350)
org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:89)


Here is the toolbar.get JS script

function main()
{
   // A default blog description
   var defaultForum =
   {
      forumPermissions:
      {
         create: false
      }
   };
   // Call the repo to get the permissions for the user for this blog
   var result = remote.call("/api/forum/site/" + page.url.templateArgs.site + "/" + (template.properties.container ? template.properties.container : "discussions") + "/posts?startIndex=0&pageSize=0");
   // Create javascript objects from the server response
   var obj = eval('(' + result + ')');        <— #15 where error is happening
   if (result.status == 200)
   {
      forum = obj;
   }
   else
   {
      forum = defaultForum;
   }
   // Prepare the model for the template
   model.forum = forum;
}
main();

Outcomes