Bug detected that may cause problems with overwritten system tiddlers?

35 views
Skip to first unread message

TonyM

unread,
Jun 4, 2020, 11:57:22 PM6/4/20
to TiddlyWikiDev
Folks,

Some of you would be aware I have had a few problems of late with upgrading tiddlywiki. The solution was to get rid of some overwitten shadow tiddlers.

I had no idea how this had occurred. But suspect I do now.

However I just noted this;

In a new empty.html use the advanced search filter [haschanged[]] and this is the result

  • $:/library/sjcl.js
  • $:/boot/bootprefix.js
  • $:/boot/boot.js
  • $:/boot/boot.css
  • $:/core
  • $:/isEncrypted
  • $:/themes/tiddlywiki/snowwhite
  • $:/themes/tiddlywiki/vanilla
  • $:/temp/info-plugin
  • $:/status/RequireReloadDueToPluginChange
  • $:/StoryList
  • $:/HistoryList
  • $:/state/tab--1498284803
  • $:/temp/advancedsearch

Are most of these not "false positives"?

Now I must ask the question why are all these flagged as has changed?, especially since many are shadow tiddlers only, or plugins such as core?

Note: I regularly exclude with -[prefix[$:/temp]] -[prefix[$:/state]] -$:/StoryList -$:/HistoryList

I have used the has changed filter to export and re-import tiddlers when my server or saver has failed in someway, clearly if I do this I import and overwrite these tiddlers, a subsequent upgrade will keep them, and seems to throw errors and the resulting wiki may be broken.

I also discovered on bob I need to exclude the following or I will also may be in grief;

  • -[prefix[$:/Bob]]
  • -[prefix[$:/ServerIP]]
  • -[prefix[$:/WikiSettings]]
Now I understand these bob tiddlers may need to change. 

However
In all wikis you can see using the haschanged operator to escape problems with the saving mechanisium is asking from trouble.

Perhaps;
We could add a filter that does not list haschanges that are not as above and allows plugins such as bob to register tiddlers that should not be considered when trying to export changes. Excluding system tiddlers is not enough if someone is editing system tiddlers even just configuration tiddlers.

The following would work if these false positives where not occurring.

[haschanged[]] -[prefix[$:/temp]] -[prefix[$:/state]] -$:/StoryList -$:/HistoryList -[prefix[$:/Bob]] -[prefix[$:/ServerIP]] -[prefix[$:/WikiSettings]]


Regards
Tony

Saq Imtiaz

unread,
Jun 5, 2020, 12:20:23 AM6/5/20
to TiddlyWikiDev
@Tony what browser and OS are you using? 

Running the filter [haschanged[]] at https://tiddlywiki.com/empty.html in Linux and the latest Chrome gives me the following:

$:/StoryList
$:/HistoryList
$:/state/tab--1498284803
$:/temp/advancedsearch

TonyM

unread,
Jun 5, 2020, 12:47:37 AM6/5/20
to TiddlyWikiDev
Saq,

I did it once again, and it did not reoccur, however I have realised I often use a bookmarklet as my first step in any "new" or online wiki.

Although my suggestion to make a filter such as below and allowing other plugins to register exclusions.
[haschanged[]] -[prefix[$:/temp]] -[prefix[$:/state]] -$:/StoryList -$:/HistoryList -[prefix[$:/Bob]] -[prefix[$:/ServerIP]] -[prefix[$:/WikiSettings]]


The bookmarklet was defined with the following filter, ie items changes at the time it was made, the listed tiddler should not be in it, but they seem to appear after the install.

[all[]modifier{$:/status/UserName}!prefix[$:/temp]!prefix[$:/state]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/PSaT/bookmarkletMaker/AdvancedSearch]]


And while this list does not change the haschanged tiddlers I think it may be changing one of the subtiddlers.

I will need to follow this lead further.

Thanks
Tony

Saq Imtiaz

unread,
Jun 5, 2020, 12:58:23 AM6/5/20
to TiddlyWikiDev
Be careful using the field filter operator with a text reference or variable as parameter, if they are not defined or empty, it is the same as calling it with an empty parameter.

Try the following on empty.html:

[modifier{$:/status/UserName}]

if {$:/status/UserName} is non existent or blank, what you get is every tiddler where this field doesn't exist or is blank.

If S is empty, field will match both of the following:
  • tiddlers that don't contain field F
  • tiddlers in which field F exists but has an empty value

TonyM

unread,
Jun 5, 2020, 1:21:10 AM6/5/20
to TiddlyWikiDev
Saq,

Thanks, That sounds like a possible cause. I may need to test if $:/status/UserName has text first. 

Tony
Reply all
Reply to author
Forward
0 new messages