Ticket #820 (closed defect: fixed)

Opened 17 months ago

Last modified 16 months ago

newTiddler macro breaks if template doesn't include text

Reported by: mahemoff Owned by: mahemoff
Priority: undefined Milestone: 2.4.2
Component: core Version:
Severity: undefined Keywords:
Cc:

Description (last modified by FND) (diff)

config.macros.newTiddler.onClickNewTiddler will break if:

  • there is a "template" parameter which references a tiddler containing no HTML control for tiddler text
  • there is a "text" parameter

The problem is apparently this:

  if(typeof text == "string")
    story.getTiddlerField(title,"text").value = text.format([title]);

story.getTiddlerField(title, "text") is returning null if the template happens to not include a "text" field.

(This arises for me because I am not allowing general users to change the text, which is simply a couple of macros.)

Attachments

NewTiddler.js.patch Download (0.5 KB) - added by mahemoff 16 months ago.

Change History

Changed 17 months ago by FND

  • description modified (diff)

Changed 16 months ago by JeremyRuston

  • owner changed from JeremyRuston to mahemoff
  • milestone set to 2.4.2

Changed 16 months ago by mahemoff

Changed 16 months ago by mahemoff

  • status changed from new to assigned

Added extra condition on "if" clause to guard against this

Changed 16 months ago by MartinBudden

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

Fixed in changeset:8001

Note: See TracTickets for help on using tickets.