Weird prompt after setting a field value to empty

Using TW5 v. 5.2.3 on Vivaldi browser (latest) with Windows 10 and timimi for saving.

I have a setup where I can fill out a form.

Values are stored in fields of a temporary tiddler (based on the qualify macro) after saving that form the fields and values are stored in the current tiddler and the temp tiddler is destroyed.

I have a button that is able to “delete a field” of the temp tiddler by setting the field value to empty ""

<$button class=<<class>> actions=<<delete-actions>>>delete text</$button>

\define delete-actions() <$action-setfield $tiddler=<<store>> $field=<<index-list>> $value="" $timestamp="no"/> \end

Whenever I use that button I get a browser prompt:

Leave site?

Changes you made may not be saved.

Clicking cancel is my solution. The operation does as intended. The field will be set to empty.
I have an older wiki v. 5.1.23 where I use the same setup and never had this problem.

I don’t understand this behavior. I would rather not get that prompt. Anyone got any idea ?

Not sure but this can occur when what you click is a link away from the wiki or Timimi palys up if the address bar contains something other than the wiki path such as ending in “?”

Yes I’ve seen a saving error the last couple of days. Timimi has problems saving because of “?”. Doesn’t save all the time.

Do you perhaps know what could be the cause of it? I noticed that it works perfectly fine with my other wikis.

Any ideas on a solution?

Its very hard to diagnose from here,

  • try and see if your “button” on hover shows a link destination ot not
  • make sure you freshly load the browser and wiki with a correct address
  • turn off autosave and see if the save step was throwing the error
  • Let it load the new address capture the address and show us

Grasping at straws.

Good suggestions thanks,

  • button shows no link
  • without saving the prompt will still show
  • all testing done is always done with a clean browser cache

After 1 redirect:

  • timimi is not able to save anything
  • the button can be used as expected without any browser prompt

The link after redirect is almost identical to the one before but it has an extra “?” right after the wiki name. (The wiki is stored on a local drive, 1 file no node.js).

addresses:

  • after opening with an empty story river file:///C:/path_to_my_wiki_file/new_wiki_002.html#:
  • after opening 1 tiddler file:///C:/path_to_my_wiki_file/new_wiki_002.html#mytiddler:[[mytiddler]]
  • after 1 redirect file:///C:/path_to_my_wiki_file/new_wiki_002.html?#mytiddler:[[mytiddler]]

And this is the timimi error:
Error while writing file open C:\path_to_my_wiki_file\new_wiki_002.html?: The filename, directory name, or volume label syntax is incorrect.

==> Other browsers give the same result.
==> Other saving mechanism (TiddlyStow) makes me click through some prompts and after reload are able to save the wiki.
==> Deleting the text from the form manually and saving works everywhere always. Without prompting, without errors.

What’s up with that button ?

@TW_Tones So I solved the problem. Thanks to your input I was able to verify that the button caused the problem. I’ve tried to to make changes to it. And this did the trick:

<$button class=<<class>>><<delete-actions>><<get-ic x>></$button>

Moving the <<delete-actions>> outside of the button made everything work fine, no prompts no saving problems.

I solved the problem without knowing what the problem actually was or how it works :wink:

But that is why TW is so charming, there are always multiple ways of getting things done.

If you (or anyone else for that matter) have any comments on the cause of this issue I would be very interested to learn how things actually work.

Would you be able to share the original Tiddlywiki that had this problem? Or a version where the problem still occurs but you removed all sensitive tiddlers from it. I tried reproducing the problem on an empty TW using the info in the first post but it worked fine.

@Maurycy
I’ve tried to clean up my wiki but I must be missing something because it doesn’t work on an empty TW yet. Due to time constraints I don’t think I will be able to post it.

I do however appreciate you reaching out to me. Thanks!