Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: value.toString is not a function #31

Closed
ittayd opened this issue May 22, 2022 · 10 comments
Closed

TypeError: value.toString is not a function #31

ittayd opened this issue May 22, 2022 · 10 comments

Comments

@ittayd
Copy link

ittayd commented May 22, 2022

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.

@linonetwo
Copy link
Collaborator

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

@ittayd
Copy link
Author

ittayd commented May 23, 2022

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
Copy link
Author

ittayd commented May 23, 2022

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

@linonetwo
Copy link
Collaborator

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

@cdaven
Copy link

cdaven commented May 30, 2022

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

@kookma
Copy link

kookma commented Sep 22, 2022

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

@ittayd
Copy link
Author

ittayd commented Mar 15, 2023

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

@KelseyShi
Copy link

演示站也有这个问题。

@Gk0Wk
Copy link
Owner

Gk0Wk commented Mar 21, 2023

have attempted to fix this issue in version 0.1.3.

@ittayd
Copy link
Author

ittayd commented Mar 25, 2023

Works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants