Issue Details (XML | Word | Printable)

Key: CONF-8419
Type: Bug Bug
Status: Resolved Resolved
Resolution: Not a bug
Priority: Major Major
Assignee: Agnes Ro [Atlassian]
Reporter: Arne Schirmacher
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Confluence

{popular} macro throws exception

Created: 02/May/07 12:59 AM   Updated: 03/May/07 12:11 AM   Resolved: 02/May/07 07:35 PM
Return to search
Component/s: Macros -- General
Affects Version/s: 2.5
Fix Version/s: None

Time Tracking:
Not Specified

Environment:

Tomcat 5.5.17


Participants: Agnes Ro [Atlassian] and Arne Schirmacher
Since last comment: 2 years, 40 weeks, 3 days ago
Labels:


 Description  « Hide

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)
.....



Agnes Ro [Atlassian] added a comment - 02/May/07 07:35 PM - edited

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.


Agnes Ro [Atlassian] added a comment - 03/May/07 12:11 AM

Help documentation has been included, see: http://jira.atlassian.com/browse/CONF-7621