Uncaught TypeError: title.substr is not a function

61 views
Skip to first unread message

Siniy-Kit

unread,
Aug 20, 2021, 8:45:47 AM8/20/21
to TiddlyWiki
by this Tiddlywiki
https://heeg.ru/shop2_2.html?id=1tEQxRZpoPPfV1i2VOq3d-Ii19zP9TYdXH3SIvv5OCUs#index
 and get error
Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser
Uncaught TypeError: title.substr is not a function

if I use the same TW, but use another spreadsheet everything is good

I think TW don't like something in my table, but I don't understand what....
 

Eric Shulman

unread,
Aug 20, 2021, 9:11:06 AM8/20/21
to TiddlyWiki
On Friday, August 20, 2021 at 5:45:47 AM UTC-7 Siniy-Kit wrote:
Hi. I import data from this googlespreadsheet ... and get error
Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser
Uncaught TypeError: title.substr is not a function

I'm not certain, but I think you need a spreadsheet column with heading of "title", so the import knows what to name each imported tiddler.

-e

Siniy-Kit

unread,
Aug 20, 2021, 12:23:53 PM8/20/21
to TiddlyWiki
this table https://docs.google.com/spreadsheets/d/16gDZVsB8FOIxrsFKbkbBNWC37lPUAfKOGf-rCVxeOmY/edit#gid=1627697525 don't have title column too, but works good.
for spreadsheet import script id=title

The problem that, when I see " title.substr is not a function" I am not able to find  part of data from my table, which  destroys my Tidlywiki. Console F12 doesn't help me 


пятница, 20 августа 2021 г. в 16:11:06 UTC+3, Eric Shulman:

Siniy-Kit

unread,
Aug 20, 2021, 2:24:03 PM8/20/21
to TiddlyWiki
the problem was that title could non be a number (only a string), when we create tiddler by 
if($tw.browser) {$tw.wiki.addTiddler(new $tw.Tiddler($tw.wiki.getModificationFields(),fields,$tw.wiki.getCreationFields()))};
so I make .toString() to all values and now it works

пятница, 20 августа 2021 г. в 16:11:06 UTC+3, Eric Shulman:
On Friday, August 20, 2021 at 5:45:47 AM UTC-7 Siniy-Kit wrote:

TW Tones

unread,
Aug 23, 2021, 8:55:08 AM8/23/21
to TiddlyWiki
Siniy-kit,

I don't know how to help, but if I were in this situation I would try and use the JSON Mangler plugin or XLSX Utilities edition to import the same spread sheet. Perhaps one of these will not experience the bug or fail gracefully helping you identify the problem.

Do join us in discourse talk.tiddlywiki.org

Tones
Reply all
Reply to author
Forward
0 new messages