TW5-CodeMirror-Enhanced icon indicating copy to clipboard operation
TW5-CodeMirror-Enhanced copied to clipboard

TypeError: value.toString is not a function

Open ittayd opened this issue 2 years ago • 6 comments

I've installed the plugin. I also have the 'external attachments' plugin, not sure if it matters. When I drag an image from a web page and import, an Untitled tiddler is created. After that, I start getting an exception as in the title. It happens in the function exports.getFieldString in $:/core/modules/widgets/jsontiddler.js at the last line (the 'else' section). The field is 'fields' and it is a json object with no toString method. It tries to get this field from $:/plugins/Gk0Wk/TW5-CodeMirror-Enhanced/config.json.

ittayd avatar May 22 '22 15:05 ittayd

maybe your cme plugin is broken, its $:/plugins/Gk0Wk/TW5-CodeMirror-Enhanced/config.json is incomplete, you can try reinstall it.

linonetwo avatar May 23 '22 04:05 linonetwo

This happens on a shared install and has happened to me several times. For some reason, after I drag the image, there is a field named 'fields' that is added to config.json and TW cannot handle it.

ittayd avatar May 23 '22 06:05 ittayd

Here is a file where the bug manifested itself. It doesn't happen if TCE is not installed error.zip

ittayd avatar May 23 '22 06:05 ittayd

I see your debug log in Jermolene/TiddlyWiki5#6704 , this maybe a core bug, or maybe usage of jsontiddler in cme is wrong.

linonetwo avatar May 26 '22 03:05 linonetwo

As a workaround, I deleted my configuration by deleting the tiddler $:/plugins/Gk0Wk/TW5-CodeMirror-Enhanced/config.json. Seems to work.

cdaven avatar May 30 '22 18:05 cdaven

Installing on a fresh empty.html + codemirror plugins raised this issue for me! I used the workaround by @cdaven

kookma avatar Sep 22 '22 06:09 kookma

Just mentioning this is still happening. Deleting of the configuration file solves the exception, but resets the configuration as well.

ittayd avatar Mar 15 '23 07:03 ittayd

演示站也有这个问题。

KelseyShi avatar Mar 21 '23 03:03 KelseyShi

have attempted to fix this issue in version 0.1.3.

Gk0Wk avatar Mar 21 '23 17:03 Gk0Wk

Works

ittayd avatar Mar 25 '23 15:03 ittayd