YukiGasai / obsidian-google-calendar

Add Google Calendar inside Obsidian
https://yukigasai.github.io/obsidian-google-calendar/
GNU General Public License v3.0
342 stars 24 forks source link

Template suggestion not working #211

Open chauser10 opened 9 months ago

chauser10 commented 9 months ago

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)
YukiGasai commented 9 months ago

Hi, are you using templater or the core plugin?

chauser10 commented 9 months ago

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 commented 9 months ago

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.

YukiGasai commented 9 months ago

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?

chauser10 commented 9 months ago

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.