OokTech / TW5-Bob

A plugin that makes tiddlywiki a multi-user wiki on node
BSD 3-Clause "New" or "Revised" License
215 stars 28 forks source link

Permaview fragment always contains same closed tiddler #132

Open fkohrt opened 4 years ago

fkohrt commented 4 years ago

Following the Step by step instructions for NodeJS I have set up the TW5-Bob server on a CentOS Linux 7 with the following changes: Inside TiddlyWiki5/Wikis/BobWiki/settings/settings.js, I set port to 7987 and host to 0.0.0.0. Now if I enable the permaview page toolbar button (e. g. by setting $:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/permaview to show) and click on the permaview button, the fragment after the # always contains $:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/permaview at the beginning -- even though this specific tiddler is closed.

I have not encountered that behaviour when using the standalone version.


I am running (check any that apply, put an x inside the [ ] to check a box, like this: [x]):

and using

Before posting I read issue guidelines and:

inmysocks commented 4 years ago

I have been trying to get this behaviour and so for I haven't been able to replicate it.

To be sure I am clear about the situation, is it:

or

?

fkohrt commented 4 years ago

It's the latter. The tiddler that is part of the url is $:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/permaview. I will look into the possibilities of providing you with an environment where this can be reproduced. Most strangely, this only encounters for the permaview button in the page toolbar, but not for the one in the view toolbar.

fkohrt commented 4 years ago

Alright, here's a guide to reproduce it:

Go to labs.play-with-docker.com, login with a docker account and then click on Start. Wait a few seconds (until ~10 seconds elapsed at the counter in the upper left corner), then click on Add New Instance (located at the left). touch run.sh and chmod +x ./run.sh, then paste the following into run.sh using the Editor.

apk add nodejs
git clone --depth=1 --branch v5.1.21 https://github.com/Jermolene/TiddlyWiki5.git
git clone --depth=1 https://github.com/OokTech/TW5-Bob.git TiddlyWiki5/plugins/OokTech/Bob
mkdir TiddlyWiki5/Wikis
cp -r TiddlyWiki5/plugins/OokTech/Bob/MultiUserWiki TiddlyWiki5/Wikis/BobWiki/
patch --forward --reject-file=- TiddlyWiki5/Wikis/BobWiki/settings/settings.json <<'EOF'
--- -
+++ TiddlyWiki5/Wikis/BobWiki/settings/settings.json
@@ -8,7 +8,7 @@
   },
   "ws-server": {
     "port": 8080,
-    "host": "127.0.0.1",
+    "host": "0.0.0.0",
     "autoIncrementPort": false
   },
   "heartbeat": {
EOF
echo 'title: $:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/permaview' > 'TiddlyWiki5/Wikis/BobWiki/tiddlers/$__Permaview.tid'
echo >> 'TiddlyWiki5/Wikis/BobWiki/tiddlers/$__Permaview.tid'
echo 'show' >> 'TiddlyWiki5/Wikis/BobWiki/tiddlers/$__Permaview.tid'
cd TiddlyWiki5
node ./tiddlywiki.js Wikis/BobWiki  --wsserver

Run /run.sh and wait until Bob is ready. Then Open Port 8080 using the according button. The newly opened page takes annoyingly long to load and sometimes stops loading before being downloaded completely. Just do a soft reload until you see the TiddlyWiki interface. Also, if it takes to long to load, abort and start loading again. Eventually, it will load, although it's a pain in the ass. Now, click on the permaview button and notice the behaviour described above.