sometimes there will be a draft of draft of a tiddler

166 views
Skip to first unread message

yrosgi L

unread,
Aug 4, 2020, 8:48:41 AM8/4/20
to TiddlyWiki
And if I change the name "the draft of the draft of something" to "something", it will noticed there has already a tiddler named "something".
I remembered this is not the first time I face the problem. And the last time I choose to delete the draft of the draft, but the original tiddler was also been deleted.

I think it is a bug. It may happened when the draft auto-saved but the browser closed abnormally. Does anyone face the same problem here?

yrosgi L

unread,
Aug 4, 2020, 8:53:45 AM8/4/20
to TiddlyWiki
PS: because the last time I lost a tiddler(recover from git history finally), this time I choose to close the draft of the draft of something, and it will become to a draft of something, and then close it normally. Fixed.

Jeremy Ruston

unread,
Aug 6, 2020, 5:09:24 AM8/6/20
to tiddl...@googlegroups.com
Hi yrosgi

The problem here is that deleting a draft also deletes the underlying original tiddler. I've made a GitHub ticket to describe the issue here:


This problem has been reported quite frequently so I'm keen to fix it for the next version.

Best wishes

Jeremy


On 4 Aug 2020, at 13:53, yrosgi L <yro...@gmail.com> wrote:


PS: because the last time I lost a tiddler(recover from git history finally), this time I choose to close the draft of the draft of something, and it will become to a draft of something, and then close it normally. Fixed.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1b84093f-df39-406a-b808-f0660e9bb498o%40googlegroups.com.

TW Tones

unread,
Aug 6, 2020, 7:29:08 PM8/6/20
to TiddlyWiki
Jeremy,

This would be a wise improvement. However it is not necessarily dealing with the cause.

Multiple drafts seem to come from the fact that many lists will show both the draft of and the non draft tiddler.
  • If an edit is done on the original tiddler while a draft tiddler already exists multiple drafts can come into play.
  • There is nothing to "protect" us from this occurring.
It is not necessarily the full solution, however with help I recently came up with the following code pattern to hide the non-draft title while a draft title exists in a list.

\define hasdrafts() {{{ [list[$:/StoryList]get[draft.of]] }}}

<$list filter="[{$:/HistoryList}split<title-string>splitbefore<end-title>removesuffix<end-title>reverse[]is[tiddler]limit[20]]">
    <$list filter="[all[current]] -[subfilter<hasdrafts>]">
        {{||$:/
core/ui/Buttons/edit}} {{||$:/core/ui/Buttons/open-window}} <$link/> <<close-if-open-button>><br>
   
</$list>
</
$list>
This is done for the history list

I wonder if a filter that allows us to say something like !has[draft.of]] and has[draft.of]] but works like my above solution
  • Allow us to include or exclude tiddler titles for which there is a draft somewhere/anywhere (not just the current title)
  • eg "New Tiddler" is the title but there is/or is not a "Draft of 'New Tiddler'" in the wiki.
  • Perhaps an operator draft[] and !draft[] that tests both if the current title begins "draft of" or a draft of for this tiddler exists anywhere.
Many of the standard lists have this feature built in, but I am hoping we can make this easier to implement, so user lists can implement this easily.

Regards
TW Tones


On Thursday, August 6, 2020 at 7:09:24 PM UTC+10, Jeremy Ruston wrote:
Hi yrosgi

The problem here is that deleting a draft also deletes the underlying original tiddler. I've made a GitHub ticket to describe the issue here:


This problem has been reported quite frequently so I'm keen to fix it for the next version.

Best wishes

Jeremy


On 4 Aug 2020, at 13:53, yrosgi L <yro...@gmail.com> wrote:


PS: because the last time I lost a tiddler(recover from git history finally), this time I choose to close the draft of the draft of something, and it will become to a draft of something, and then close it normally. Fixed.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.

Jeremy Ruston

unread,
Aug 7, 2020, 6:05:20 AM8/7/20
to tiddl...@googlegroups.com
Hi TWTones

This would be a wise improvement. However it is not necessarily dealing with the cause.

It’s not clear how the draft of the draft was created; the system tries to prevent it (see below) but there’s no structural obstacle to a draft of a draft and so when custom code comes into play it’s perfectly possible to create one.

Multiple drafts seem to come from the fact that many lists will show both the draft of and the non draft tiddler.
  • If an edit is done on the original tiddler while a draft tiddler already exists multiple drafts can come into play.
That’s not correct, the system will reuse the existing draft. For example, on tiddlywiki.com:

1. Edit HelloThere and delete all the text and replace it with “Testing", but don’t click the tick to save it
2. Use the sidebar “Open” tab to close the draft tiddler
3. Use the search box to open HelloThere
4. Click the edit button
5. You’ll see the text “Testing”, showing that the same draft was reused.
  • There is nothing to "protect" us from this occurring.
The navigator widget does in fact check for an existing draft when asked to edit a tiddler.

Best wishes

Jeremy

To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/24d2d047-1e93-4850-bd83-aa02e32e7f53o%40googlegroups.com.

yrosgi L

unread,
Aug 8, 2020, 7:57:35 AM8/8/20
to TiddlyWiki
Hi Jeremy,

Today I found another strange behavior:

1. create a new tiddler(B) from a exist tiddler(A), do some input
2. edit another tiddler(C)

and then, the tiddler C's content will display as empty and can not close by click the button of the edit box.
While, this case can solve by click the close button on the left to the item link which list in right side.

Don't whether these two problem related or not.

Best wishes

L,

PMario

unread,
Aug 8, 2020, 8:44:44 AM8/8/20
to TiddlyWiki
Hi L,

Did you test this at tiddlywiki.com. ... I can't replicate your behavior there.

-mar

yrosgi L

unread,
Aug 8, 2020, 9:14:07 AM8/8/20
to TiddlyWiki
Sorry PMario,


Actually I do not test it on tiddlywiki.com yet. Because it just  occurred one time and the second time it become right.

P.S. I opened many tiddlers(about 15 or more) on my wiki. Also I set the option that let the URL anchor's path map to the list of opened tiddlers.

Best wishes

L,
Reply all
Reply to author
Forward
0 new messages