You are here: Foswiki>Tasks Web>Item881 (08 Sep 2010, KennethLavrsen)Edit Attach

Item881: Not possible to have more than 1 instance of META{"attachments"} on the page

Priority: Normal
Current State: Closed
Released In: 1.0.7
Target Release: patch
Applies To: Engine
Component: PatternSkin
Reported By: SvenDowideit
Waiting For:
Last Change By: KennethLavrsen
(if added to a topic by the user)

as the attachtables.pattern.tmpl is coded to assume there is only one on a topic. The twistie becomes non-unique, and I assume other bits fail.

ignoring that the META attach functionality is naf, it should still work :/

I've also noticed that the twistie button says 'Attachments 2 2' when there are 2 attachments

  • Sounds like the twistie is broken at that point. Does it open and close? -- ArthurClemens - 28 Jan 2009

-- SvenDowideit - 28 Jan 2009

Can you add an example when more than 1 topic is involved?

-- ArthurClemens - 28 Jan 2009

I don't mean more that one topic is involved - simply take any topic that has an attachment, and add %META{"attachments"}% into the topic text.

yes, the twistie is broken - presumably because there are thus two with the same name/id.

-- SvenDowideit - 28 Jan 2009

I can fix this, but it is dependent on how Twisty works. When a remember parameter is passed, it stores the id in a cookie to determine if the twisty should be opened or closed on next visit. When I remove the id from the attachments, each topic attachment twisty will have its own state stored, instead of all attachment buttons. That will lead to unpredictable behaviour for attachment twisties.

To prevent this, I need to meddle with TwistyPlugin - see Item1729.

Should definitely not go in 1.0.7.

-- ArthurClemens - 15 Jun 2009

Fixed with Item1729. After all this was such a simple fix that it can safely go into 1.0.7.

-- ArthurClemens - 02 Sep 2009

ItemTemplate edit

Summary Not possible to have more than 1 instance of META{"attachments"} on the page
ReportedBy SvenDowideit
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component PatternSkin
Priority Normal
CurrentState Closed
TargetRelease patch
ReleasedIn 1.0.7
Topic revision: r7 - 08 Sep 2010, KennethLavrsen - This page was cached on 06 Jun 2020 - 06:28.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy