Templates not loading

windows10 pro system
Joplin 1.0.201 (prod, win32)

Client ID: f6e962293a854ce19c053e07c8f7ab4a
Sync Version: 1
Profile Version: 28

Revision: e65af8c1 (master)

templates don’t seem to load:

restarted joplin portable
‘file’-‘templates’-‘refresh templates’
‘file’-‘templates’-‘create note from templates’
template select dialog pops up, selected the template. select ‘ok’

nothing seems to happen. here is a listing of what’s in my templates directory:
Annotation 2020-04-21 064858

is it just me?

thanks

guess it is just me. anyone have any ideas?

since i guess i am the only one with this problem. is there any tips on how to debug this issue? is there a debug version available that will generate a log file or stack trace? anything, or am i on my own?

Sorry I should have responded to this earlier. Yes it seems like you’re the only one. If you use the help menu you should see an option to toggle development tools. Click that and you should be able to check the console for errors.

thanks, and sorry to be a pest. i found the offending issue:

C:\Users\steve\AppData\Local\Temp\1aaNjl3NR2Q97fx2ybPJsz9pDT8\resources\app.asar\node_modules\mustache\mustache.js:239 Uncaught (in promise) Error: Unclosed section "custom_datetime" at 158
at parseTemplate (C:\Users\steve\AppData\Local\Temp\1aaNjl3NR2Q97fx2ybPJsz9pDT8\resources\app.asar\node_modules\mustache\mustache.js:239)
at Writer.parse (C:\Users\steve\AppData\Local\Temp\1aaNjl3NR2Q97fx2ybPJsz9pDT8\resources\app.asar\node_modules\mustache\mustache.js:496)
at Writer.render (C:\Users\steve\AppData\Local\Temp\1aaNjl3NR2Q97fx2ybPJsz9pDT8\resources\app.asar\node_modules\mustache\mustache.js:515)
at Object.render (C:\Users\steve\AppData\Local\Temp\1aaNjl3NR2Q97fx2ybPJsz9pDT8\resources\app.asar\node_modules\mustache\mustache.js:655)
at Object.TemplateUtils.render (C:\Users\steve\AppData\Local\Temp\1aaNjl3NR2Q97fx2ybPJsz9pDT8\resources\app.asar\lib\TemplateUtils.js:29)
at createNewNote (C:\Users\steve\AppData\Local\Temp\1aaNjl3NR2Q97fx2ybPJsz9pDT8\resources\app.asar\gui\MainScreen.min.js:136)
at Object.onClose (C:\Users\steve\AppData\Local\Temp\1aaNjl3NR2Q97fx2ybPJsz9pDT8\resources\app.asar\gui\MainScreen.min.js:440)
at Object.promptOnClose_ [as onClose] (C:\Users\steve\AppData\Local\Temp\1aaNjl3NR2Q97fx2ybPJsz9pDT8\resources\app.asar\gui\MainScreen.min.js:728)
at onClose (C:\Users\steve\AppData\Local\Temp\1aaNjl3NR2Q97fx2ybPJsz9pDT8\resources\app.asar\gui\PromptDialog.min.js:172)
at onKeyDown (C:\Users\steve\AppData\Local\Temp\1aaNjl3NR2Q97fx2ybPJsz9pDT8\resources\app.asar\gui\PromptDialog.min.js:205)

here is the offending line:

{{#custom_datetime}} YYYY-MM-DD {/custom_datetime}}

2 Likes

I’ve never used templates before but tried now: created a simple .md file, clicked refresh templates a few times but still could not create a note from it.

Restarting the app solved the issue for me. Would be good if that worked without a restart thought.

@sttrebo - I suggest you check log.txt in your profile dir for any errors.

UPD
Looks like you’ve found the issue while I was typing that.

1 Like

If you can consistently reproduce this it would be great. I can’t reproduce the issue and I really don’t know what could be causing it.

missing '{'

crap after all this, a typo...

We should handle the error better it seems, maybe we should print what's in the console directly in the note?

that would be better. at least it makes the trouble shooting easier. then we could see which offending line it was. makes it easier for us md newbies…