listed operator cannot operate on shadow tiddlers.

35 views
Skip to first unread message

Matthew Lauber

unread,
Aug 8, 2017, 8:31:59 AM8/8/17
to TiddlyWikiDev
As part of a plugin I'm working on, I am trying to group a variety of tiddlers by one or more categories.  In order to do this, I added a category field, and populated it as a list field.  Then, to generate a list of all the items in my plugin, by category, I did 

<$list filter="[tag[MyPlugin]each:list-item[category]sort[]]" variable="Category">
<$link to<<Category>><<Category>></$link>
<ul>
<$list filter="[all[tiddler+shadows]<Category>listed[category]]">
<li><$link><<currentTiddler>></li>
</$list>
</ul>
</$list>


This worked great in development, but once I packaged the plugin, none of the items in my categories were showing up.  After some digging, I determined this is because the `listed` operator uses findListingsOfTiddler which in turn, uses .each rather than .eachTiddlerPlusShadows.  I'm not sure the correct fix for this.  For my own purposes, I can override `findListingOfTiddler, and it doesn't seem to have negative effects.  But I'm not sure that solution would be safe in all situations.  

Is this an actual bug in Tiddlywiki?  Is there another way to achieve what I'm trying to achieve?  I've opened a ticket, but I'm not sure how what the "correct" way to fix it would be.


Thanks,
Matt Lauber
Reply all
Reply to author
Forward
0 new messages