Offline TiddlyWiki

375 views
Skip to first unread message

mail

unread,
Oct 24, 2011, 3:51:48 PM10/24/11
to TiddlyWeb
Hi,

maybe I#m wrong in my understanding. However, I thought I can download
the TiddlyWiki to my disk, make changes and upload those changes later
using sync. However, I get the following error message if I open the
TiddlyWiki file from my disk:
"It appears that this TiddlyWiki has been incorrectly saved. Please
see http://www.tiddlywiki.com/#Download for details."

I also tried to start with an empy TiddlyWiki but I don't know which
Plugins I need. I guess some special plugins and a Tiddler with the
Server details and the tah systemServer will do the trick?

Thanks for any help
Sven

chris...@gmail.com

unread,
Oct 25, 2011, 6:35:42 AM10/25/11
to TiddlyWeb
On Mon, 24 Oct 2011, mail wrote:

> maybe I#m wrong in my understanding. However, I thought I can download
> the TiddlyWiki to my disk, make changes and upload those changes later
> using sync. However, I get the following error message if I open the
> TiddlyWiki file from my disk:
> "It appears that this TiddlyWiki has been incorrectly saved. Please
> see http://www.tiddlywiki.com/#Download for details."

This ought to be possible, but you need to make sure you are not using
"File->Save As" when viewing a wiki but instead are downloading a raw
version of the wiki. The file->save as version will have content
modified by the browser and won't work.

In TiddlyWeb the most straightforward way of creating a download copy
is to append ?download=myfile.html to the URL, for example:

http://tiddlyweb.peermore.com/wiki/recipes/docs/tiddlers.wiki?download=wiki.html

--
Chris Dent http://burningchrome.com/
[...]

ma...@klomp.eu

unread,
Oct 26, 2011, 12:57:08 PM10/26/11
to tidd...@googlegroups.com
Hi,

Thanks, this worked. However, the sync entry for each Tiddler is empty. How
can I push changes back to the TiddlyWeb instance? I expect a plugin is
needed? And how can I configure the systemServer Tiddler?

Sven

chris...@gmail.com

unread,
Oct 28, 2011, 7:09:17 AM10/28/11
to tidd...@googlegroups.com
On Wed, 26 Oct 2011, ma...@klomp.eu wrote:

>> In TiddlyWeb the most straightforward way of creating a download copy
>> is to append ?download=myfile.html to the URL, for example:
>>
>> http://tiddlyweb.peermore.com/wiki/recipes/docs/tiddlers.wiki?download=wiki.html
>
> Thanks, this worked. However, the sync entry for each Tiddler is empty. How
> can I push changes back to the TiddlyWeb instance? I expect a plugin is
> needed? And how can I configure the systemServer Tiddler?

What is the URL you are using when downloading your TiddlyWiki? From
that we can determine whether the one being downloaded included the
necessary plugins.

If you are using TiddlyWebWiki, then it is the system bag which
contains those plugins. The default recipe includes that bag plus
another bag to which content is written, so if you get:

http://myserver.example.com/recipes/default/tiddlers.wiki?download=wiki.html

The wiki.html ought to be able to sync.

Sven Klomp

unread,
Oct 30, 2011, 8:14:44 AM10/30/11
to tidd...@googlegroups.com
Thanks for all the help!

I have the plugins in my TiddlyWiki after downloading the correct recipe
with the system bag.

However, synchronisation still doesn't work. Although the sync button in
the backstage tells me, that syncing was successfull ("Saved update on
server"), no changes are visible on my server. I'm using TiddlyHoster
(http://hoster.peermore.com) for my tests...

Furthermore, I get the following error messages in my lokal TiddlyWiki
when I open the sync menu:
"Error parsing result from server: SyntaxError: syntax error"

Are my expectations too high? I thought I can use TiddlyWeb and
TiddlyWiki to have an offline Wiki with the capability to synchronise
with other computers.

Sven

chris...@gmail.com

unread,
Oct 30, 2011, 9:23:48 AM10/30/11
to tidd...@googlegroups.com
On Sun, 30 Oct 2011, Sven Klomp wrote:

> Are my expectations too high? I thought I can use TiddlyWeb and TiddlyWiki to
> have an offline Wiki with the capability to synchronise with other computers.

It's not clear from what you are saying whether they are or not. Can
you go into more detail about exactly what you are doing, in a step
by step fashion including details such as:

* the browser you are using
* the URLs you are entering in your browser

Thanks.

Sven Klomp

unread,
Oct 30, 2011, 1:35:36 PM10/30/11
to tidd...@googlegroups.com
Hi,

On 10/30/2011 02:23 PM, chris...@gmail.com wrote:
> On Sun, 30 Oct 2011, Sven Klomp wrote:
>> Are my expectations too high? I thought I can use TiddlyWeb and
>> TiddlyWiki to have an offline Wiki with the capability to synchronise
>> with other computers.
> It's not clear from what you are saying whether they are or not. Can
> you go into more detail about exactly what you are doing, in a step
> by step fashion including details such as:
>
> * the browser you are using
> * the URLs you are entering in your browser

OK, I'll try to make it more clear. I'm using Firefox 7.0.1.

What I want:
* Having an offline TiddlyWiki.
* Adding a Tiddler.
* Select from different TiddlyWeb-Servers or Bags one to synchronize the
Tiddler.
* Synchronize
On another machine with another TiddlyWiki copy:
* Select some Tiddlers from the servers to import them (e.g. the newly
created one)


What I'm doing:
* Download my private TiddlyWiki from
hoster.peermore.com/recipes/www.klomp.eu-private/tiddlers.wiki?download=wiki.html
* Loading the local wiki.html
* Editing an existing Tiddler
* "save changes"
* Clicking on sync in the backstage area
* Selecting the changed Tiddler and click synchronize
I get the following result:
GettingStarted|tiddlyweb|http://hoster.peermore.com|bags/www.klomp.eu-private|Saved
update on server|View

However, the changes are not on the server...

Thanks for help
Sven


chris...@gmail.com

unread,
Oct 30, 2011, 3:08:08 PM10/30/11
to tidd...@googlegroups.com
On Sun, 30 Oct 2011, Sven Klomp wrote:

> OK, I'll try to make it more clear. I'm using Firefox 7.0.1.

Okay, thanks, this helps, it gives enough answers to to look in the
logs on the relevant server and also fill in some of the blanks.

The problem you're seeing is the results of increased security
measures in browsers (including firefox 7) which restrict access to
stuff on other domains or from file: URIs.

I can confirm this from the tiddlyweb server side because there are
"OPTIONS" requests in the server log.

If you search in the tiddlywiki and tiddlywikidev groups for "CORS"
you'll find more information.

Right this minute there's not much that can be done to improve the
situation: the browsers aren't going to change.

Over the long term both TiddlyWiki and TiddlyWeb will likely evolve to
keep up with this stuff. For TiddlyWeb this will mean supporting what
are called "preflight checks"

http://www.w3.org/TR/cors/#cross-origin-request-with-preflight0

The available workarounds aren't particularly satisfactory:

* Use an older browser.
* Make your edits on a tiddlywiki on an http URI from the server where
the content is store, not file.

> What I want:
> * Having an offline TiddlyWiki.
> * Adding a Tiddler.
> * Select from different TiddlyWeb-Servers or Bags one to synchronize the
> Tiddler.
> * Synchronize
> On another machine with another TiddlyWiki copy:
> * Select some Tiddlers from the servers to import them (e.g. the newly
> created one)

This is, in a nutshell, exactly the reason the Adaptor mechanism
in tiddlywiki exists. However, at least from my perspective, it was
never completely finished to provide the best UI for what you describe
above. And now that the browsers are enforcing these new restrictions
the situation has become a good deal more complicated than it used to
be.

Sven Klomp

unread,
Oct 31, 2011, 4:00:41 PM10/31/11
to tidd...@googlegroups.com
Hi,

many thanks for this detailed clarification! Is Firefox 3.6 old enough?

Sven

chris...@gmail.com

unread,
Nov 1, 2011, 7:59:57 AM11/1/11
to tidd...@googlegroups.com
On Mon, 31 Oct 2011, Sven Klomp wrote:

> many thanks for this detailed clarification! Is Firefox 3.6 old enough?

I believe so, yes.

Sven Klomp

unread,
Nov 4, 2011, 12:21:38 PM11/4/11
to tidd...@googlegroups.com
Hi,

I tried FF 3.6 and it works as expected.
I also tried https://addons.mozilla.org/de/firefox/addon/forcecors/ in FF 7.
However, without success. It's because TiddlyWeb doesn't support
cors/preflight?

Sven

chris...@gmail.com

unread,
Nov 4, 2011, 12:32:30 PM11/4/11
to tidd...@googlegroups.com
On Fri, 4 Nov 2011, Sven Klomp wrote:

forcecors only forces for GET and POST request and it is PUT requests
that are happening when you sync back to a tiddlyweb server. However,
even if forcecors did force PUT, it wouldn't help as PUT requires the
preflight stuff (there's a description here:

https://developer.mozilla.org/En/HTTP_access_control

) and as you've figured out TiddlyWeb doesn't process the OPTIONS
header required for the preflight handling. At the moment this is
intentional: Supporting such things would be a) complex b) has unclear
security ramifications. It's hard to safely control for the specific
use case you're describing without also opening a hole for random
Javascript that you might stumble across as you browse the web.

As you can imagine, this is quite a big deal for the "sync" model of
using TiddlyWiki with content stored on the network. I'm not sure what
the ramifications or solutions (if any) will be. I'm hoping that
conversation in the tiddlywiki googlegroup will uncover something that
can be applied across the spectrum of server-sides.

By which I mean: I don't think this is a tiddlyweb specific problem
but I hope to be able to implement whatever resolution is discovered
and chosen within the TiddlyWiki community.

Reply all
Reply to author
Forward
0 new messages