Controlling plugin order

42 views
Skip to first unread message

Matthew Lauber

unread,
Feb 11, 2018, 6:43:02 PM2/11/18
to TiddlyWikiDev
I've got some tweaks I like on all my wikis (breakpoint, story river width, etc).  I tried to pack them into a plugin so I can move them from wiki to wiki easily, but what I discovered is that once I pack them into the plugin, they no longer work.  I can see them inside the plugin, so what I think is happening is that my preference plugin is being loaded before the theme plugin itself, and thus the theme overwrites my tweaks.  

Can anyone shed light on what controls plugin load order?

Simon Huber

unread,
Feb 12, 2018, 12:00:09 AM2/12/18
to TiddlyWikiDev
Hello Matthew,

this could be because TW loads the stylesheet before the vanilla base stylesheet, so that the latter overrides your styles. I had that problem, too

For me it worked adding the field "list-after" with this content: $:/themes/tiddlywiki/vanilla/base

Simon

Matthew Lauber

unread,
Feb 12, 2018, 10:20:42 AM2/12/18
to TiddlyWikiDev
I'm actually not editing the stylesheets, but the configuration tiddler itself. (e.g. $:/themes/tiddlywiki/vanilla/metrics/storywidth)  But I'll look at put a list-after on my plugin, see if I can control plugin-order via that.  Thanks!

Matthew Lauber

unread,
Feb 12, 2018, 10:48:12 AM2/12/18
to TiddlyWikiDev
So, I found this code, and tried setting the `plugin-priority` field on my plugin, but it doesn't seem to affect the ordering.  However, renaming my plugin from $:/plugins/mklauber/... to $:/zzz/plugins/mklauber/... does, which says to me it's an ordering issue.  Anyone familiar with that code, or better able to explain plugin ordering?
does.

Matthew Lauber

unread,
Feb 12, 2018, 11:00:27 AM2/12/18
to TiddlyWikiDev
Finally tracked it down.  It seems like there's a bug in ordering plugins when one has a plugin-priority and the other doesn't.  I've thrown a PR up for the fix here.  https://github.com/Jermolene/TiddlyWiki5/pull/3113  @Jeremy, can you take a look?

Matt
Reply all
Reply to author
Forward
0 new messages