diff --git a/core/modules/saver-handler.js b/core/modules/saver-handler.js index 23056bcc2..612613140 100644 --- a/core/modules/saver-handler.js +++ b/core/modules/saver-handler.js @@ -46,8 +46,10 @@ function SaverHandler(options) { // Filter the changes so that we only count changes to tiddlers that we care about var filteredChanges = self.filterFn.call(self.wiki,function(iterator) { $tw.utils.each(changes,function(change,title) { - var tiddler = self.wiki.getTiddler(title); - iterator(tiddler,title); + if(change.normal) { + var tiddler = self.wiki.getTiddler(title); + iterator(tiddler,title); + } }); }); // Adjust the number of changes diff --git a/core/modules/startup/plugins.js b/core/modules/startup/plugins.js index fc8ba9589..af354c38e 100644 --- a/core/modules/startup/plugins.js +++ b/core/modules/startup/plugins.js @@ -75,7 +75,7 @@ exports.startup = function() { $tw.wiki.unpackPluginTiddlers(); // Queue change events for the changed shadow tiddlers $tw.utils.each(Object.keys(changedShadowTiddlers),function(title) { - $tw.wiki.enqueueTiddlerEvent(title,changedShadowTiddlers[title]); + $tw.wiki.enqueueTiddlerEvent(title,changedShadowTiddlers[title], true); }); } } diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 620f4eccf..928a2e847 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -141,12 +141,15 @@ This method should be called after the changes it describes have been made to th title: Title of tiddler isDeleted: defaults to false (meaning the tiddler has been created or modified), true if the tiddler has been deleted + isShadow: defaults to false (meaning the change applies to the normal tiddler), + true if the tiddler being changed is a shadow tiddler */ -exports.enqueueTiddlerEvent = function(title,isDeleted) { +exports.enqueueTiddlerEvent = function(title,isDeleted,isShadow) { // Record the touch in the list of changed tiddlers this.changedTiddlers = this.changedTiddlers || Object.create(null); this.changedTiddlers[title] = this.changedTiddlers[title] || Object.create(null); this.changedTiddlers[title][isDeleted ? "deleted" : "modified"] = true; + this.changedTiddlers[title][isShadow ? "shadow" : "normal"] = true; // Increment the change count this.changeCount = this.changeCount || Object.create(null); if($tw.utils.hop(this.changeCount,title)) {