variables in subfilters make TW crash

19 views
Skip to first unread message

CarloGgi

unread,
Nov 21, 2021, 8:30:27 AM11/21/21
to TiddlyWiki

Hallo everybody, I go into trouble when using variables in subfilters, they make code as simple as

<$list variable="indx" filter="[tag[myTag]indexes[]]">

    <$vars subf="[getindex<indx>split[,]trim[]match[aword]]">

        <$list filter="[tag[myTag]filter<subf>]" variable="result">
             <<result>> <br/>
        </$list>

    </$vars>

</$list>

to crash TW with Internal Javascript error: "TypeError: widget is undefined"


Even narrowing down the outer <$list> to a simple <$set> widget as in


<$set name="indx" value="index-01">

    <$vars subf="[getindex<indx>split[,]trim[]match[aword]]">

        <$list filter="[tag[myTag]filter<subf>]" variable="result">
                 <<result>> <br/>
        </$list>
    </$vars>

</$set>

doesn't improve things at all. Same Internal Javascript error: "TypeError: widget is undefined". It really looks like using variables inside subfilters is the problem, as soon as I replace it with a parameter, like for example

      <$vars subf="[getindex[index-01]split[,]trim[]match[aword]]">

Tiddliwiki stops complaining.

Thanks for any hints, suggestions, etc.

CG

Ubuntu 18.04.6 LTS
Firefox 94.0

Saq Imtiaz

unread,
Nov 21, 2021, 8:44:56 AM11/21/21
to TiddlyWiki
I suspect you are using TW v5.1.23 in which this is a know issue. Upgrading to v5.2.0 should resolve it. If it does not, please report back.

CarloGgi

unread,
Nov 21, 2021, 8:45:12 AM11/21/21
to TiddlyWiki
I forgot the most important: TW version!

Tiddlywiki 5.1.23
Ubuntu 18.04.6 LTS
Firefox 94.0

CG

CarloGgi

unread,
Nov 21, 2021, 8:46:08 AM11/21/21
to TiddlyWiki
BINGO!

Thanks. :)
Reply all
Reply to author
Forward
0 new messages