When I am using the {popular} macro in the "Site Welcome Message" which can be set in the General Configuration, I get the exception below. The macro does work in the normal page context though.
2007-05-02 07:41:46,916 ERROR [TP-Processor11] [renderer.v2.components.MacroRendererComponent] processMacro Unexpected error formatting macro: popular
– url: /dashboard.action | userName: schirmacher | action: dashboard
java.lang.NullPointerException
at com.atlassian.confluence.ext.usage.query.AbstractUsageQuery.getLuceneQuery(AbstractUsageQuery.java:54)
at com.atlassian.confluence.ext.usage.index.UsageIndexManager$4.perform(UsageIndexManager.java:272)
at com.atlassian.bonnie.LuceneConnection.withSearch(LuceneConnection.java:139)
at com.atlassian.confluence.ext.usage.index.UsageIndexManager.queryPopular(UsageIndexManager.java:268)
at com.atlassian.confluence.ext.usage.macros.PopularMacro.execute(PopularMacro.java:57)
at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:45)
at com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:340)
at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:241)
at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:130)
at com.atlassian.renderer.v2.components.MacroRendererComponent.handlePotentialMacro(MacroRendererComponent.java:115)
at com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:77)
at com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:54)
at com.atlassian.renderer.v2.V2RendererFacade.convertWikiToXHtml(V2RendererFacade.java:57)
at sun.reflect.GeneratedMethodAccessor272.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:284)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
at $Proxy33.convertWikiToXHtml(Unknown Source)
at com.atlassian.confluence.renderer.DefaultWikiStyleRenderer.convertWikiToXHtml(DefaultWikiStyleRenderer.java:23)
at com.atlassian.confluence.util.ContentFacade.getWelcomeMessage(ContentFacade.java:67)
at com.atlassian.confluence.dashboard.actions.DashboardAction.getWelcomeMessage(DashboardAction.java:37)
at sun.reflect.GeneratedMethodAccessor895.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.velocity.runtime.parser.node.PropertyExecutor.execute(PropertyExecutor.java:154)
at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:226)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:207)
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:250)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:109)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:271)
at org.apache.velocity.runtime.directive.Parse.render(Parse.java:232)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:109)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:271)
at org.apache.velocity.Template.merge(Template.java:296)
at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedTemplateWithoutSwallowingErrors(VelocityUtils.java:53)
at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:229)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:271)
at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:215)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:153)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:109)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:271)
.....
This is not a bug.
If you do not provide the 'space' parameter for the popular macro, then it tries to use the current space the page is on. In the case of using it on the dashboard, since there is no space an error has occurred. Please try using the following syntax:
{popular:space=@all}It does seem like the popular macro is poorly documented. I will try to write some help documentation for it.
Agnes.