obsidian-google-calendar icon indicating copy to clipboard operation
obsidian-google-calendar copied to clipboard

Template suggestion not working

Open chauser10 opened this issue 1 year ago • 5 comments

I am not getting any suggestion for a default template or when the template modal pops up. The output folder suggestion works just fine. In the console the following error is logged when I click to focus on the input box. If I type the correct file name the template still gets applied so this isn't a major issue. Thanks for your work on this plugin! I find it super useful.

Uncaught TypeError: Cannot read properties of undefined (reading 'replace')
    at pe (app.js:1:246598)
    at he (app.js:1:246519)
    at cl.getSuggestions (plugin:google-calendar:25:68949)
    at cl.onInputChanged (plugin:google-calendar:25:67547)

chauser10 avatar Oct 15 '23 17:10 chauser10

Hi, are you using templater or the core plugin?

YukiGasai avatar Oct 15 '23 18:10 YukiGasai

I am using templater. Happy to provide more details to help debug, although I may need some instruction since I am not a programmer 😅.

chauser10 avatar Oct 15 '23 19:10 chauser10

Now that you asked that I set the Templates folder in the core addon settings menu and this resolved my issue! I am now getting suggestions for templates. If this is the expected behavior I am okay with closing the issue.

chauser10 avatar Oct 15 '23 19:10 chauser10

I would like to handle this error, but I am currently not able to reproduce your setup. Did you set a folder for the core templates plugin or the templater plugin? Are there any special characters in the folder name?

YukiGasai avatar Oct 15 '23 21:10 YukiGasai

I will document the error a little better, just don't have time right now. To answer your questions for now:

  1. When the error was occurring, the core templates plugin folder was not set. Setting the templater plugin template folder did not seem to make a difference. As soon as I set the core template plugin template folder in the settings menu the error stopped happening.
  2. No there are no special characters.

chauser10 avatar Oct 16 '23 15:10 chauser10