Item11730: QUERY referencing the attachment fields can't access attachment 0 when there is only one attachment

Priority: Normal
Current State: Closed
Released In: 1.1.5
Target Release: patch
Applies To: Engine
Component: QUERY
Branches: Release01x01 trunk
Reported By: GeorgeClark NigelWinterbottom
Waiting For:
Last Change By: NigelWinterbottom
Cloned from Item11502, which was describing two separate problems

I'm running "Foswiki version Foswiki-1.1.4, Tue, 20 Dec 2011, build 13483, Plugin API version 2.1" I have a similar issue:
Returns the string "comment" instead of the actual comment. When there is more than one attachment in the source topic however, the above works correctly.

-- NigelWinterbottom - 13 Mar 2012

The changes were minimal (a single line)
www-data@foswiki:/var/www/foswiki/lib/Foswiki/Query$ diff /home/foswiki/
<         return $b->evaluate( data => $lval, tom => $domain{tom} );
>         return $b->evaluate( data => $lval, tom => $domain{tom} ) ? $lval : [];
I replaced the file and have to report that the above example still does not work; it returns a null string instead of the actual comment.

I tried & from trunk and can report that the above example does work as expected.

Flipping CurrentState back to New because this Item is not fixed in Foswiki 1.1.5

-- NigelWinterbottom - 26 Mar 2012

Confirmed - this is still broken on 1.1.5RC2.

-- GeorgeClark - 05 Apr 2012

Fixed this case too. Nigel, try this version of

-- KipLubliner - 06 Apr 2012

After returning from Easter Hols and celebrating my birthday on the 10th, I discovered Foswiki 1.1.5 had been already released, so I upgraded and tested that instead.of the files in branch.

I can now happlily report this issue is fixed.

-- NigelWinterbottom - 12 Apr 2012
Topic revision: r10 - 12 Apr 2012, NigelWinterbottom
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