Issue Details (XML | Word | Printable)

Key: CONF-7030
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Michelle A. Hoyle
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

contentbylabel macro throws Java errors when used in BLOG or COMMENT objects

Created: 23/Sep/06 08:57 PM   Updated: 08/Oct/06 09:53 PM
Component/s: Labels, Macros -- General
Affects Version/s: 2.2.5, 2.2.9
Fix Version/s: 2.2.10

Time Tracking:
Not Specified

Environment: Atlassian's Confluence 2.2.9 installation

Participants: Agnes Ro [Atlassian], Ivan Benko [Atlassian] and Michelle A. Hoyle
Since last comment: 2 years, 13 weeks, 2 days ago
Resolution Date: 08/Oct/06 09:53 PM
Labels:


 Description  « Hide
Summary:
contentbylabel throws Java errors when embedded into a BLOG or COMMENT object

Discussion:
I was trying to include a list of content pages from a different space by using the contentbylabel macro. I discovered the following:

  • the macro works fine when embedded in a PAGE object;
  • the macro will work in page preview mode when a new BLOG object is created but then will give a Java error on subsequent viewings of that BLOG object.
  • the macro will give a Java error when embedded in a COMMENT object.

Proof of Concept:
I uncovered this problem on my Confluence 2.2.5 but I was easily able to replicate it in Atlassian's Confluence 2.2.9 test space. See http://confluence.atlassian.com/display/TEST/2006/09/23/contentbylabel+macro+test+in+news

Sample Macro Call:

{contentbylabel:permissions|key=CONF20}

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Michelle A. Hoyle added a comment - 24/Sep/06 11:23 AM
Error in 2.2.9 BLOG Post:
Error formatting macro: contentbylabel: java.lang.ClassCastException: com.atlassian.confluence.pages.BlogPost

Error in 2.2.9 COMMENT Post:
Error formatting macro: contentbylabel: java.lang.ClassCastException: com.atlassian.confluence.pages.Comment

Error in 2.2.5 BLOG Post:
Error formatting macro: contentbylabel: java.lang.ClassCastException


Ivan Benko [Atlassian] added a comment - 24/Sep/06 09:07 PM
Thanks Michelle for reporting this behaviour.
I have confirmed it in version 2.2.9.
Ivan

Agnes Ro [Atlassian] added a comment - 08/Oct/06 09:53 PM
Fixed.