After reading this article earlier in the week: https://www.scottantipa.com/store-app-state-in-urls, I remembered the tiddlywiki share plugin which can read tiddler json from the url. I didn’t play with it several years ago when it was released (see discussion on google groups), but when I tried last week it didn’t work. Based on what I see in the git history, it has been broken for a long time.
Now it is fixed and working again. The share links I give below seem to work in the preview pane here on Discourse. I’m not sure if the links will survive through to the emailed version of the post.
Here is a simple share link example which embeds a simple tiddler in the url: hello world test
Another example containing a single tiddler. However, this tiddler generates an iframe for 10+ tiddlywiki editions, so loading this page is pretty heavyweight. Especially since one of the wikis demonstrates the innerwiki plugin which itself has a handful of wikis embedded:
Here is the content of the tiddler (the filter is much more complicated than it needs to be…I could have just explicitly listed all the urls…I was just experimenting):
Hi @btheado thanks for your help fixing things up. Both URLS work for me on an iPad when clicking directly from the talk.tiddlywiki.org website, but not when clicking on the link in the email.
That’s too bad. The output of encodeURIComponent("#") is %23. Maybe the mail client is mangling it. I notice if I paste the links into a gmail draft, the same mangling happens.
We could change the share plugin to look for either # or %23. The drawback of doing that is if someone has the share plugin installed and they also want to generate a permalink to a tiddler whose title begins with #, then the share plugin will incorrectly think there are tiddlers to parse.
I intended to make this tiddlyhost site https://shared.tiddlyhost.com/ a fairly light one to support using the share plugin. Let me know if you want me to configure it to support such sharing as a general utility service to the community.
I think you should upgrade the plugin on your site to the latest (https://tiddlywiki.com/prerelease/share). Looks like the version on your site suffers from the 3 bugs I fixed and so it doesn’t currently function properly on your site.
But there hasn’t been any TW release since the share plugin fixes were merged to master, so the updated share plugin will not be in the official plugin library yet (I’m guessing the updated plugin is in the prerelease library, but your url for that library is also wrong).
Oh, but I guess in cases like this, the json parsing of the url would fail, so the share plugin would not end up intercepting the page load. The above permalink should still work.
This turned out to be straightforward; the commit with the fix is here. In 10 minutes or so the build should have completed and the links posted above will start working.
Thank you for picking this up @btheado. We originally somewhat lost interest in the share plugin because it didn’t work well with Google Groups. Getting it working here on Discourse opens up some interesting possibilities. I’m sure there’s potential to make things easier to use. For example, we could add an export option to advanced search “Share these tiddlers via tiddlywiki.com/share” that generates a shareable URL for tiddlers within your own wiki.
Thanks @jeremyruston. The links from the original post work still fine for me, but when I manually change the second hash in the url to %23 (to simulate receiving through email), then there is some undesirable behavior. See hello world test using percent 23.
It seems that startup/storylist.js is also picking up the location hash and it opens a “Missing tiddler” with a title matching the json in the hash.
There is some code in boot.js ($tw.utils.getLocationHash) which is checking for ‘#’ which might be related. See also:
Maybe the share plugin can convert the %23 back into the ‘#’? That way the boot.js code will trigger and prevent startup/storylist.js from seeing the json?