TiddlyWiki5
TiddlyWiki5 copied to clipboard
[BUG] TypeError: value.toString is not a function
Describe the bug
This issue manifests itself after a weird interaction that I'll describe below. The bottom line is that a json field causes the exception in the subject and after that the wiki becomes unusable: cannot delete the field, tiddler or anything as the error keeps popping.
It happens in $:/core/modules/tiddler.js in the method getFieldString as the value of the field doesn't have the 'toString' method.
Attached is a wiki where this happens (try to edit a tiddler)
Expected behavior
No response
To Reproduce
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Screenshots
No response
TiddlyWiki Configuration
- Version [e.g. v5.1.24]
- Saving mechanism [e.g. Node.js, TiddlyDesktop, TiddlyHost etc]
- Plugins installed [e.g. Freelinks, TiddlyMap]
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
No response
The bottom line is that a json field causes the exception in the subject and after that the wiki becomes unusable:
Which field in which tiddler, what is the content of this field?
Can you please provide steps to reproduce the problem in an empty TiddlyWiki file?
(Note that I attached a wiki that has the error manifested)
The tiddler is $:/plugins/Gk0Wk/TW5-CodeMirror-Enhanced/config.json, the field is 'cache' (but note it also happened in a field named 'fields' in another wiki).
It turns out 'cache' is the field that causes the exception if I edit config.json, but if I create a new tiddler and save, then the exception is in the field 'fields' in config.json
@ittayd thanks, I think jsontiddler module should provide a stringify method for fields
field, or ignore the fields
field.