mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-26 13:17:38 +00:00
Fix bug with innerwiki template
The problem was that the innerwiki template included the tiddler $:/plugins/tiddlywiki/railroad, which was omitted from the wiki. Unexpectedly, missing tiddlers were rendered by the jsontiddler widget as an empty object {}. The fix is to always include the title when the tiddler is missing.
Also cleaned up the template to remove unneeded tiddlers
This commit is contained in:
@@ -79,6 +79,8 @@ JSONTiddlerWidget.prototype.getTiddlerFields = function() {
|
|||||||
var tiddler = this.wiki.getTiddler(this.attTiddler);
|
var tiddler = this.wiki.getTiddler(this.attTiddler);
|
||||||
if(tiddler) {
|
if(tiddler) {
|
||||||
fields = tiddler.getFieldStrings({exclude: this.attExclude.split(" ")});
|
fields = tiddler.getFieldStrings({exclude: this.attExclude.split(" ")});
|
||||||
|
} else {
|
||||||
|
fields = {title: this.attTiddler};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fields;
|
return fields;
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
"description": "Innerwiki Plugin Demo",
|
"description": "Innerwiki Plugin Demo",
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"tiddlywiki/innerwiki"
|
"tiddlywiki/innerwiki",
|
||||||
|
"tiddlywiki/railroad"
|
||||||
],
|
],
|
||||||
"themes": [
|
"themes": [
|
||||||
"tiddlywiki/vanilla",
|
"tiddlywiki/vanilla",
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
title: $:/plugins/tiddlywiki/innerwiki/template
|
title: $:/plugins/tiddlywiki/innerwiki/template
|
||||||
|
|
||||||
\define saveTiddlerFilter()
|
\define saveTiddlerFilter()
|
||||||
$:/boot/boot.css
|
|
||||||
$:/boot/boot.js
|
|
||||||
$:/boot/bootprefix.js
|
|
||||||
$:/core
|
$:/core
|
||||||
$:/library/sjcl.js
|
|
||||||
$:/plugins/tiddlywiki/innerwiki
|
$:/plugins/tiddlywiki/innerwiki
|
||||||
$:/plugins/tiddlywiki/railroad
|
$:/plugins/tiddlywiki/railroad
|
||||||
$:/themes/tiddlywiki/snowwhite
|
$:/themes/tiddlywiki/snowwhite
|
||||||
|
|||||||
Reference in New Issue
Block a user