fixed nasty tiddlywiki bug involving defaultCustomFields

15 Dec

This was a nasty bug mostly for the diagnosis part than the solving of
it, as it came up in a weird way. In brief:
– I was looking at a tiddlywiki, inside tiddlyweb, and getting
weirdness in the way tiddlers were being persisted.
– @FND on irc was a big help and pointed out “server.title” field was
being erroneously set.
– Turned out config.defaultCustomFields included server.title for some reason.
– I thought it was something the comments plugin was doing. But it was
a new thing I’d done…I’d created a tiddler using
store.saveTiddler(……) and for the fields parameter, I’d set it to
config.defaultCustomFields. Bad news as it was causing the underlying
value to be changed.

Ideally, creating a new tiddler would be as simple as
store.createTiddler(). Given the current API, though, I learned my
lesson.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: