Ticket #541 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: EricShulman Owned by: 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 Download (421 bytes) - added by FND 2 years ago.

Change History

  Changed 2 years ago 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   Changed 2 years ago 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   Changed 2 years ago 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)

Changed 2 years ago by FND

  Changed 2 years ago by FND

Thanks Eric - it's fixed now.

  Changed 2 years ago by JeremyRuston

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

Fixed in changeset:4203

Note: See TracTickets for help on using tickets.