History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: POSI-55
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Michael McKeown
Votes: 1
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Confluence Extension: Composition Plugin

Deck and Cards not displaying with version 2.0 or 2.2, works fine with 1.4.8

Created: 10/Oct/06 04:24 AM   Updated: 03/Jun/08 03:16 AM
Component/s: {deck}, {card}
Affects Version/s: 2.0, 2.2
Fix Version/s: None

Time Tracking:
Not Specified

Environment: Confluence 2.2.8, Confluence 2.2.9


 Description  « Hide
A simple script such as: {composition-setup} {deck:id=aDeckTest}
{card:label=Card1}
Some content{card}
{card:label=Card2}
More content{card}{deck}

This displays fine in IE and firefox when using release 1.4.8. When using release 2.0 or 2.2 this displays nothing (i.e. just an empty page)in either IE or Firefox.

Other macros such as Cloak continue to work fine after upgrading to 2.0 or 2.2



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
David Peterson - 10/Oct/06 04:41 AM
Hi Michael,

My website is running on Conf 2.2.9 and I don't have any trouble with decks - the plugin pages are full of them.

Some possibilities:

1. Put each {deck} and {card} macro on its own line. Due to the hackery I had to do to get nesting working there are sometimes rendering issues caused if they share space with other content.

2. Are you using a custom theme? Themes are often missing some critical JavaScript includes which will render the page inoperable if not present.

David


Michael McKeown - 10/Oct/06 06:12 AM
Hi,

Thanks for the quick reply.

I'm using the Left Navigation Theme - you're correct, if I use the default theme it does work.

Thanks,

Michael


David Peterson - 10/Oct/06 06:16 AM
Hmm. I hadn't tried it with Left Nav before. That's kind of annoying...

I have had an idea to try working around the dependency problem - I'll keep you posted as to when/if it's implemented.


Dhivya Manoharan - 07/Aug/07 07:02 AM
Hi
My confluence is running in the version2.5 only not conf 2.2.9.
though my issue is that basic script or macro {composition-setup} {deck:id=myDeck}
{card:label=tab1}
This is the first tab's content{card}
{card:label=tab2}
This is the second tab's content{card}{deck}
is not displaying in the IE. but it is working fine in some space but not in some other space.

With Regards,
Dhivya.M


David Peterson - 07/Aug/07 07:16 AM
If it's working in some spaces and not others, it's usually theme-related. Do the spaces where it's working have a different theme to the ones where it's not?

Also, as an aside, it's usually a good idea to have a {card} macros on their own line, rather than at the start of end of other content.


Dhivya Manoharan - 07/Aug/07 12:39 PM - edited
Hi David,

We are using theme builder. the space which was built by theme builder the code for composition plugin works fine.

But the code im using is in default Theme only doesnt works.

With Regards,
Dhivya.M


Amitee Goulton - 22/Jan/08 12:43 AM
I'm wondering if this is in any way related to the issue we're having, I can't get deck to work on either IE or FireFox in an older version of Confluence.

Confluence 2.1.2
Composition Plugin version 2.0
No custom theme
Each line of the macro is on its own line

{composition-setup}
cloak.memory.duration = 3
cloak.toggle.type = default{composition-setup} {deck:id=My Deck}
{card:label=Card 1}
Card 1 contents.{card}
{card:label=Card 2}
Card 2 contents.{card}{deck}

I checked the error console in FireFox and it said "Element.show is not a function" - the offending line is:

Element.show(el);


Amitee Goulton - 22/Jan/08 12:45 AM
Ok, well it's on its own line in my wiki markup anyway!

David Dembo - 03/Jun/08 02:41 AM
FYI we're experiencing a slight variation of this issue. Confluence 2.5.6 with the Approvals Workflow Plugin.

The deck & cards display fine on the 'View' tab, but not on the 'Published' version of the page. FF's error console shows the same error above (Element.show is not a function) for the Published view.

The 'View' and 'Published' versions are both decorated by page.vmd, but the plugin introduces a new mode (released) which is used to render the article's content differently in the mode-specific section (e.g. #if $mode == "view" ... #if $mode == "released").

The only differences I can see between the two blocks of code in our page.vmd are:

  • "view" mode sets $labelable = $page
  • "view" mode parses /labels/labels-include.vm

Our test installation is using Confluence 2.7.3, and it seems to work fine on both the 'View' and 'Published' tabs in that version. We'll be upgrading our live instance to the same version soon so I'll let you know whether that fixes the issue or not.

Hope the above information helps!


David Dembo - 03/Jun/08 03:12 AM
Eureka! I just fixed the issue in 2.5.6

I added the following to the "released" mode decorating block:

<script type="text/javascript" language="JavaScript" src="$webResourceManager.getStaticResourcePrefix()/labels-javascript"></script>

I thought I'd look into the labels javascript in a bit more depth, and the Element.show function (and a bunch of others) are all defined in the above javascript.

Why on earth they decided to include a whole truckload of generic javascript in a 2389472189471 line file that only gets included if labels are present on a page is beyond me... but it seems that's what they did.

So my guess is that the custom themes that are broken do not parse /labels/labels-include.vm, or are parsing a modified version that does not include the above script.


David Peterson - 03/Jun/08 03:16 AM
Yeah, this is a common problem for custom themes. I also have no idea why they chose to put the JS libraries in that include - it gets missed a lot by custom themes. Apparently in 2.7/2.8 there are a couple of velocity macros which will ensure that specific JS libraries are included on the page once, but they are specific to both versions, so any macros using them will be locked to that version of Confluence unfortunately...