What I’m trying to do
It’s kind of very simple. When I try to call tp.file.title it says that it can’t read the property file because it is undefined. The context of this is, I’m trying to access the tp.file from a user script. My Templater is already set up. Templater does detect my custom “function”/script. But whenever I write in my note <%* await tp.user.load_function() %> and then hit the Command Palette → “Templater: Replace templates in the active file” I get this error:
Templater Error: Template parsing error, aborting.
Cannot read properties of undefined (reading ‘file’)
I’ve already searched on this topic but nothing similar has come up. I tried debugging with ChatGpt. I’ve made sure that Templater has the correct scripts folder and templates folder. It seems like a very weird error since tp.file is very fundamental to Templater but it seems that even though I call it from a note it says the file is undefined.
Can someone help me please?