Issue Details (XML | Word | Printable)

Key: CONF-9489
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Agnes Ro [Atlassian]
Reporter: Don Willis [Atlassian]
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

The Excerpt Macro no longer works in comments

Created: 17/Sep/07 06:40 AM   Updated: 11/Oct/07 11:49 PM
Component/s: Macros -- General
Affects Version/s: None
Fix Version/s: 2.6.1

Time Tracking:
Not Specified

Participants: Agnes Ro [Atlassian] and Don Willis [Atlassian]
Since last comment: 1 year, 16 weeks, 3 days ago
Resolution Date: 11/Oct/07 11:49 PM
Labels:


 Description  « Hide
Putting an {excerpt} macro in a comment (which admittedly may make no sense) now produces this error message in the comment:

Error formatting macro: excerpt: java.lang.ClassCastException: com.atlassian.confluence.pages.Comment

And this stacktrace in the log:

2007-09-17 21:25:00,596 ERROR [http-8080-Processor25] [renderer.v2.components.MacroRendererComponent] processMacro Unexpected error formatting macro: excerpt
 -- url: /display/~don.willis@atlassian.com/Home | userName: don.willis@atlassian.com | action: viewpage | page: 16482364
java.lang.ClassCastException: com.atlassian.confluence.pages.Comment
	at com.atlassian.confluence.renderer.v2.macros.ExcerptMacro.execute(ExcerptMacro.java:63)
	at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:45)
	at com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:254)
	at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:150)
	at com.atlassian.renderer.v2.components.WikiContentRendererHandler.handleMacro(WikiContentRendererHandler.java:18)
...

The reason for this is pretty clear: That line is casting the Comment to an (AbstractPage). The scary bit is that the convertXHtmlToWikiMarkup method to which the AbstractPage would be passed, doesn't even use that page, so passing (AbstractPage)null would work (but obviously isn't a good idea).

This seems to have come in with the fix for CONF-6342.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.