TiddlyWiki5 icon indicating copy to clipboard operation
TiddlyWiki5 copied to clipboard

Draft is not in edit mode after page reload under Node.js with lazy loading

Open rubaboo opened this issue 5 years ago • 6 comments

This started fairly recently. I'm using the current master branch from here, running on Node.js. Used to be: I am editing a tiddler, I reload the page, and when the page is loaded, the tiddler is back in edit mode. Now: After a page reload, I have a 'Draft of …' tiddler in view mode. If I repeat the steps, it will be 'Draft of 'Draft of ...'', etc.

rubaboo avatar Sep 21 '19 19:09 rubaboo

Hi @rubaboo I can't duplicate the problem. Are you using any plugins? Does it occur if you run ./bin/serve.sh (or the equivalent)? It also might be helpful to know what browser and operating system you're using.

Jermolene avatar Sep 22 '19 15:09 Jermolene

Happens when lazy-all loading, with either --server or --listen. My $:/DefaultTiddlers is [list[$:/StoryList]].

rubaboo avatar Sep 23 '19 07:09 rubaboo

I have seen this inside single file wikis depending on how you open the draft tiddler. If you open the root tiddler it should open the draft that was not saved, if you open the draft it will create a draft of it.

Have you used the new feature that shows draft tiddler titles in red at the bottom of the page? With this you get to open the current draft.

AnthonyMuscio avatar Oct 01 '19 00:10 AnthonyMuscio

@AnthonyMuscio I don't open anything, my story is persistent between reloads. You can achieve that by having yout $:/DefaultTiddlers body set to [list[$:/StoryList]]. So it used to be that a reloaded page would come up exactly the same as it was. If I left any tiddler in edit mode, it would be there in edit mode after reload.

I switched back to root-tiddler=$:/core/save/all and the issue is not there.

rubaboo avatar Oct 02 '19 01:10 rubaboo

That's probably still valid and there should be more similar issues here, but we can't reliably replicate the problem

pmario avatar Aug 29 '22 00:08 pmario

Thanks @pmario @rubaboo that's helpful, it is evidently a problem with lazy loading. I've amended the title accordingly.

Jermolene avatar Sep 05 '22 21:09 Jermolene