Updated December 2010: Site Blog Dashlet is now hosted on Share Extras.
This extension to Alfresco Share provides a custom Site Dashlet, which displays the most recent ten posts from the site blog component.
To install the dashlet download
Also pictured in the screenshot is the Site Tags Dashlet, which displays a tag cloud visualisation for all the tags within a site.
This is exactly what I’ve been looking for! I’ve tried this dashlet, however I get the following error as soon as there is at least one entry. Any ideas? 🙁
An error has occured in the Share component: /share/service/components/dashlets/site-blog.
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: 08060013 Failed to process template org/alfresco/components/dashlets/site-blog.get.html.ftl
Server: Alfresco Spring WebScripts – v1.0.0 (Milestone 3 357) schema 1,000
Time: Sep 6, 2010 4:08:12 PM
Click here to view full technical information on the error.
Exception: java.lang.StringIndexOutOfBoundsException – String index out of range: 100
java.lang.String.substring(String.java:1934)
freemarker.core.StringBuiltins$substringBI$1.exec(StringBuiltins.java:213)
freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
freemarker.core.Expression.getStringValue(Expression.java:93)
freemarker.core.DollarVariable.accept(DollarVariable.java:76)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
freemarker.core.Environment.visit(Environment.java:415)
freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.IfBlock.accept(IfBlock.java:82)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.Environment.process(Environment.java:188)
freemarker.template.Template.process(Template.java:237)
org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:156)
org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:578)
org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:263)
org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:143)
org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:69)
org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:203)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:319)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:177)
org.springframework.extensions.webscripts.WebScriptProcessor.executeBody(WebScriptProcessor.java:275)
org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:79)
org.springframework.extensions.surf.render.RenderService.processComponent(RenderService.java:468)
org.springframework.extensions.surf.render.RenderService.renderRawComponent(RenderService.java:970)
org.springframework.extensions.surf.render.bean.ComponentRenderer.body(ComponentRenderer.java:113)
org.springframework.extensions.surf.render.RenderService.renderRegionComponents(RenderService.java:827)
org.springframework.extensions.surf.taglib.RegionIncludeTag.doStartTag(RegionIncludeTag.java:36)
org.springframework.extensions.surf.render.TagService.execute(TagService.java:213)
org.springframework.extensions.surf.render.TagService.execute(TagService.java:148)
org.springframework.extensions.webscripts.FreemarkerTagSupportDirective.executeTag(FreemarkerTagSupportDirective.java:92)
org.springframework.extensions.webscripts.GenericFreemarkerTagDirective.execute(GenericFreemarkerTagDirective.java:121)
freemarker.core.Environment.visit(Environment.java:261)
freemarker.core.UnifiedCall.accept(UnifiedCall.java:126)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.Environment.process(Environment.java:188)
freemarker.template.Template.process(Template.java:237)
org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:156)
org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:328)
org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:79)
org.springframework.extensions.surf.render.RenderService.processRenderable(RenderService.java:390)
org.springframework.extensions.surf.render.bean.ChromeRenderer.body(ChromeRenderer.java:49)
org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:131)
org.springframework.extensions.surf.render.bean.RegionRenderer.body(RegionRenderer.java:114)
org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:131)
org.springframework.extensions.surf.render.RenderService.startRegionRenderer(RenderService.java:779)
org.springframework.extensions.surf.render.RenderService.renderRegion(RenderService.java:723)
org.springframework.extensions.surf.render.PresentationUtil.renderRegion(PresentationUtil.java:134)
org.springframework.extensions.surf.taglib.RegionTag.doStartTag(RegionTag.java:101)
org.springframework.extensions.surf.render.TagService.execute(TagService.java:213)
org.springframework.extensions.surf.render.TagService.execute(TagService.java:148)
org.springframework.extensions.webscripts.FreemarkerTagSupportDirective.executeTag(FreemarkerTagSupportDirective.java:92)
org.springframework.extensions.webscripts.RegionFreemarkerTagDirective.execute(RegionFreemarkerTagDirective.java:122)
freemarker.core.Environment.visit(Environment.java:261)
freemarker.core.UnifiedCall.accept(UnifiedCall.java:126)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
freemarker.core.Environment.visit(Environment.java:415)
freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
freemarker.core.Environment.visit(Environment.java:415)
freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.Macro$Context.runMacro(Macro.java:164)
freemarker.core.Environment.visit(Environment.java:601)
freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.IfBlock.accept(IfBlock.java:82)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.Macro$Context.runMacro(Macro.java:164)
freemarker.core.Environment.visit(Environment.java:601)
freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.Environment.visit(Environment.java:393)
freemarker.core.BodyInstruction.accept(BodyInstruction.java:93)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.Macro$Context.runMacro(Macro.java:164)
freemarker.core.Environment.visit(Environment.java:601)
freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.Environment.process(Environment.java:188)
freemarker.template.Template.process(Template.java:237)
org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:156)
org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:328)
org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:79)
org.springframework.extensions.surf.render.RenderService.processTemplate(RenderService.java:582)
org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.body(TemplateInstanceRenderer.java:124)
org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:131)
org.springframework.extensions.surf.render.bean.PageRenderer.body(PageRenderer.java:70)
org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:131)
org.springframework.extensions.surf.render.RenderService.startPageRenderer(RenderService.java:664)
org.springframework.extensions.surf.render.RenderService.renderPage(RenderService.java:641)
org.springframework.extensions.surf.render.PresentationUtil.renderPage(PresentationUtil.java:95)
org.springframework.extensions.surf.mvc.PageView.dispatchPage(PageView.java:349)
org.springframework.extensions.surf.mvc.PageView.renderView(PageView.java:290)
org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:136)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:67)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
java.lang.Thread.run(Thread.java:619)
Exception: org.springframework.extensions.webscripts.WebScriptException – 08060013 Failed to process template org/alfresco/components/dashlets/site-blog.get.html.ftl
org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:160)
Okay, the error only occurs when the Blog entry is shorter than 100 characters.
It’s because of this line in site-blog.get.html.ftl:
${(post.content!””)?substring(0, 100)} …
Goldmar, I’ve now updated the dashlet to fix this issue and several others. The updated dashlet can now be found here: http://code.google.com/p/share-extras/
Cool, this is great! I’ll try it out! 🙂
Hello!
Try adding a post with more then three doublequotes in it, in the first 100 chars.
It will break the dashboard for IE users.
Added ?replace(‘]+(>|$)’, ”, ‘r’) to the string, which helped.
<#if (post.content)?length${(post.content!””)?replace(‘]+(>|$)’, ”, ‘r’)}${(post.content!””)?substring(0, 200)?replace(‘]+(>|$)’, ”, ‘r’)} …
Hi Henrik, are you using the version that’s posted on the blog or the later version that’s now part of Share Extras (http://code.google.com/p/share-extras/ )? If the latter, could you file a bug on the issue tracker there?