Steps to reproduce:
Desired Result:
Pressing this button should open the already existing journal entry, OR create a new one with a (1) after the name with "overwrite tex"
Actual Result:
A tiddler with the same title as today's journal is opened whose content is "overwrite text". If this is saved, it will overwrite your journal entry! If this is instead discarded, you get back your original journal entry.
Originally reported here:
https://groups.google.com/d/msg/TiddlyWiki/3zBqF4MA9WU/_UguFixpBAAJ
As part of this thread:
https://groups.google.com/d/msg/TiddlyWiki/3zBqF4MA9WU/YZY9EfcYBAAJ
OR create a new one with a (1)
IMO not needed: use something like this: DDth MMM YYYY - 0hh:0mm:0ss for the title, will give enough granularity.
But overwriting an existing tiddler text, is definitely a problem. ...
Pressing this button should open the already existing journal entry
It does. Does it not for you?
If it does. Please close this issue.
I think this is indeed a bug; the long term behaviour is that one can click the "new journal" button without worrying about whether one has already created a new journal today.
At first, I thought the problem was introduced in 967b123b51c06ab4e14470196f0a15064167a8f4, but actually I think it goes back further.
The underlying issue is that additional fields provided in the tm-new-tiddler message have always taken precedence over values for those fields in any existing tiddler.
We could fix the OP by changing the tm-new-tiddler behaviour so that the existing tiddler fields take priority, but that would break backwards compatibility. The existing behaviour is useful for making a new tiddler by cloning an existing one but changing/overriding certain fields.
An alternative, more radical, solution would be to switch the "new journal" button to using a template tiddler. This is already supported by the tm-new-tiddler message handling, but it isn't wired up for creating new journals. We'd also need to expose a user interface in control panel for setting the name of the template tiddler, and for directly editing the text and tags for compatibility with the present arrangement.
@tobibeer, it does not, when $:/config/NewJournal/Text has content in it.
I just tried on tiddlywiki.com a whole range of scenarios, with text in $:/config/NewJournal/Title, without text, and never had a scenario where it would not open the existing tiddler. So, I'm mildly confused, since I cannot replicate any overwriting.
Ah, $:/config/NewJournal/Text ! :D
But then a crucial question is indeed, why is this not happening when the text is blank / undefined? I imagine there could be some reveal magic that has the button behave differently, i.e. "if exists, use tm-edit-tiddler, otherwise use tm-new-tiddler".
I Posted a Solution here
Reproduced in part.
So the bug that needs fixing is to remove the unwanted space from the end of the New Journal Tiddler name.
The extra space is not found in $:/config/NewJournal/Text
It occurs in New Journal and New Journal Here
The fault is in the buttons
Edit both buttons and look for the line
This has being tested at tiddlywiki.com
Regards
Tony
@AnthonyMuscio ... very good catch. ... The problem is: The space was introduced to fix a different bug. ... If the last character of the template is a double-quote " the button will break. :(
So adding your proposal will re-introduce this "edge-cases bug" ... Similar to my "space-fix". It activated your issue :/
So the real solution will be a bit trickier .. but solvable.
@AnthonyMuscio ... the title-fix will not solve the original issue. ... It's a different problem
Sorry I was responding to a different problem, as Mario suggested the one cause by the fix and I followed a link to this issue. Next time I will read the whole thread.
no problem. ... I think we will have a fix for both issues soon :)
Most helpful comment
I think this is indeed a bug; the long term behaviour is that one can click the "new journal" button without worrying about whether one has already created a new journal today.
At first, I thought the problem was introduced in 967b123b51c06ab4e14470196f0a15064167a8f4, but actually I think it goes back further.
The underlying issue is that additional fields provided in the
tm-new-tiddlermessage have always taken precedence over values for those fields in any existing tiddler.We could fix the OP by changing the
tm-new-tiddlerbehaviour so that the existing tiddler fields take priority, but that would break backwards compatibility. The existing behaviour is useful for making a new tiddler by cloning an existing one but changing/overriding certain fields.An alternative, more radical, solution would be to switch the "new journal" button to using a template tiddler. This is already supported by the
tm-new-tiddlermessage handling, but it isn't wired up for creating new journals. We'd also need to expose a user interface in control panel for setting the name of the template tiddler, and for directly editing the text and tags for compatibility with the present arrangement.