Ticket #283 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

Tiddler called "Display" causes TiddlyWiki to corrupt display

Reported by: UdoBorkowski Owned by: FND
Priority: major Milestone: 2.4.1
Component: core Version:
Severity: high Keywords:
Cc:

Description

Steps to reproduce

  • Take an empty TW 2.1.3
  • Create a tiddler "ABC"
  • Press "Done"

(everything is fine)

  • Create a tiddler called "Display"
  • Press "Done"

Now the tiddler ABC is automatically removed from the screen and the tiddler "Display" is the only visible tiddler. The command buttons of "Display" ("close", "close other"...) are displayed without margin.

Checked on FireFox? and IE

Attachments

ticket283.patch Download (466 bytes) - added by MartinBudden 4 years ago.
ticket283_alt.patch Download (466 bytes) - added by FND 4 years ago.
alternative implementation ensuring unique tiddler IDs

Change History

Changed 5 years ago by JeremyRuston

It is caused because there's a clash between two assumptions:

- in the core code, that a tiddler DIVs in the main story with the title "Example" has the DOM id "tiddlerExample" - in the default stylesheets and templates, that the DIV containing the display area has the DOM id "tiddlerDisplay"

When you write it like that, it's obvious that things will not be happy when a tiddler is called "Display".

There's no easy way around this one that I can see, apart from changing the ID of the "tiddlerDisplay" element.

Changed 5 years ago by JeremyRuston

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

Fixed in changeset:1501 by changing the "tiddlerDisplay" id in the PageTemplate? to "storyDisplay".

I've added a rather spikey hack to stop everyone's PageTemplate? breaking whereby there's an search and replace for "tiddlerDisplay"->"storyDisplay" before applying a PageTemplate?.

Changed 5 years ago by JeremyRuston

  • status changed from closed to reopened
  • resolution fixed deleted
  • milestone changed from 2.2 to 2.3

Retracted in changeset:2220 because of backwards compatibility issues

Changed 4 years ago by MartinBudden

  • owner JeremyRuston deleted
  • status changed from reopened to new

Changed 4 years ago by MartinBudden

  • owner set to MartinBudden

I think the problem can be solved by changing the creation of the story in main() from:

story = new Story("tiddlerDisplay","tiddler");

to

story = new Story("tiddlerDisplay","story");

The second parameter is the story idPrefix. This change ensures that all tiddlers in the story have an id of the form storyXXX (where XXX is the tiddler title) and so their ids cannont clash with the container div id ("tiddlerDisplay").

Changed 4 years ago by MartinBudden

  • milestone changed from 2.3 to unscheduled

Changed 4 years ago by MartinBudden

  • milestone changed from unscheduled to soon

Changed 4 years ago by MartinBudden

  • milestone changed from soon to 2.4

Changed 4 years ago by MartinBudden

Changed 4 years ago by MartinBudden

  • milestone changed from 2.4 to 2.5

Changed 4 years ago by MartinBudden

  • owner changed from MartinBudden to FND

Unfortunately this cannot be fixed without breaking compatibility of existing tiddlywikis. A work around that does not allow users to create tiddlers called "Display" could be implemented

Changed 4 years ago by FND

alternative implementation ensuring unique tiddler IDs

Changed 4 years ago by FND

  • status changed from new to assigned

Changed 4 years ago by FND

cross-reference: #680

Changed 4 years ago by FND

  • milestone changed from 2.5 to 2.4.1

Changed 4 years ago by MartinBudden

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

Fixed in changeset:5626

Note: See TracTickets for help on using tickets.