Tiddlyhost error on one computer only: file changed on server

i’ve been running a tiddlyhost wiki and accessing it from different computers with no problem. but recently (within the past few months?), trying to save from one specific computer gives me this error preventing the save:
image
firefox 132.0.2 on windows 11.

reloading, emptying browser cache, restarting browser/computer does not help. i can save fine using edge (browser), from another computer (firefox, windows 10), or my phone (firefox, android) with no problem.

anyone have a fix?

hmm, might it be related to this? Timimi not saving (for me at least) with latest Firefox release in Windows 11

This looks like the simple protection mechanisium is working (you have made changes elsewhere) but of course could be a bug and a false flag. There is a posibility that some kind of file has being left behind on tiddlyhost and not deleted. If you get no where perhaps contact @simon

is there a way to disable this, so it saves anyways? i don’t see an option in settings in tiddlyhost or the wiki.

Does the problem persist if you do a “Shift-Reload”, i.e. hold down shift and click reload?

(Edit: I guess emptying the browser cache would probably have the same effect.)

For troubleshooting purposes:

When you load your TiddlyWiki, there’s a response header called “Etag”. The value of that is remembered by TiddlyWiki and when you save, the value is placed in a request header called “If-Match”. If the server thinks the current etag doesn’t match the value it sees in the “If-Match” header they it will refuse to save and produce the error message you’re seeing.

The challenge is to figure out why Tiddlyhost is deciding the values don’t match. If TiddlyWiki is providing the correct value in the If-Match header, then it could be a Tiddlyhost bug. It could also be that your browser for some reason is using an older etag value.

thank you for your responses! as it turns out i had made some minor change on another computer, so it was working as intended. however, as the warning doesn’t pop up unless you try to save, i had done a fairly substantial amount of work that now wouldn’t save.

it would be nice if there was a way (a button on the tiddlyhost settings page?) to force ignore this mechanism and save anyways. in this case, i was able to export the edited tiddlers and re-import them after saving on the windows 10 computer and reloading.

I’m sure more experienced users have better polished ways of doing this, but if I have unsaved work I want to download, I do this:

  • In Advanced Search > Filter: I enter [all[tiddlers+shadows]!sort[modified]]
  • I select and copy the titles of all tiddlers with recent changes I care about, which should be a contiguous block at the top
  • I paste those into the indicated line in a tiddler that looks like this:
<$let tids="""
                 *** paste multiple lines of tiddlers here ***
""">
{{{ [<tids>split[
]] :map[format:titlelist[]addsuffix[ ]] }}}
</$let>
  • I save that tiddler and copy the (now-formatted) list of results back into Advanced Search > Filter
  • I choose the Export Tiddlers > JSON File button to the right of the search entry box.
  • I save that file,
  • I reload the wiki and drag the file back in.

It’s a fairly easy process that takes me less than two minutes.

thanks for the tip! i used commander, in this case i was modifying a certain type (tag) of tiddler so i could just export by tag. but a filter like [all[tiddlers+shadows]!sort[modified]limit[##]] would work great for the general case :slight_smile:

I wish I was ever just modifying a certain tag. Every time I go to fiddle with content, I also find some way to improve my procedures, functions, templates, and css. No save with more than about two tiddlers is ever clean content.

Must… stop… fiddling! (Ah, who am I kidding?)

1 Like

Since the OP seems to be solved, this info is just for other users that may read this thread in the future.

I think this post may be of interest: "Emergency Save" - How to Save a Wiki if the UI is Broken

-m

1 Like

Does the server retain the “current etag” from the time the file was loaded? Or is it generated during the save? If the etag is on the server, where and how is it saved?

Each TiddlyWiki file on Tiddlyhost is represented by an ActiveStorage::Blob record, which represents the actual blob in the storage back end, say Amazon S3. The value used for the etag is literally the checksum of that blob, which Rails stores as a field in the ActiveStorage::Blob record.

So if the etag TiddlyWiki provides when saving doesn’t match, Tiddlyhost assumes the file the browser loaded originally is not the same as the current file on the server. The server can’t say much about why it’s different, it just knows that it’s different and assumes it must be because another save happened.

In theory, if the browser reloads the latest file and etag from the server, it should always match on save. In theory at least… :thinking: