TiddlyWiki.org

Ticket #541 (closed enhancement: fixed)

Opened 4 months ago

Last modified 4 months ago

permalink/permaview of non-existent tiddler should not display default empty tiddler

Reported by: EricShulman Assigned to: FND
Priority: trivial Milestone:
Component: core Version:
Severity: trivial Keywords:
Cc:

Description

When a URL contains a permalink/permaview that includes reference to a non-existent tiddler, an *empty* tiddler is displayed (with the "double-click to create" default text). When readOnly mode is in effect (i.e., viewed over http:), the user cannot actually create the new tiddler. In this circumstance, it would be sensible to not even display the empty tiddler to begin with.

This can be achieved by the following core code:

config.paramifiers.open = {
        onstart: function(v) {
                if (readOnly && store.tiddlerExists(v))
                        story.displayTiddler("bottom",v,null,false,null);
        }
};

which simply amends the current 'open' paramifier to include a conditional check before invoking displayTiddler().

Attachments

ticket541.patch (421 bytes) - added by FND on 30/03/08 16:05:02.

Change History

30/03/08 13:24:13 changed by EricShulman

  • summary changed from When readOnly is set, permalink/permaview of non-existent tiddler should not display default empty tiddler to permalink/permaview of non-existent tiddler should not display default empty tiddler.

Oops! Conditional should be:

if (!readOnly || store.tiddlerExists(v))

(follow-up: ↓ 3 ) 30/03/08 13:26:59 changed by FND

  • owner changed from JeremyRuston to FND.
  • priority changed from undefined to trivial.
  • status changed from new to assigned.

I've also added a check for shadow tiddlers in the attached patch.

(in reply to: ↑ 2 ) 30/03/08 14:06:53 changed by EricShulman

Replying to FND:

I've also added a check for shadow tiddlers in the attached patch.

Note that the core function is named

store.isShadowTiddler(v)

not

store.isShadowed(v)

30/03/08 16:05:02 changed by FND

  • attachment ticket541.patch added.

30/03/08 16:05:20 changed by FND

Thanks Eric - it's fixed now.

31/03/08 15:20:31 changed by JeremyRuston

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in changeset:4203