Help debugging templater on iOS

I have a template for creating a new Meeting Minutes note. It works perfectly on my mac. But fails not quite 100% of the time on my iOS devices.

It throws an exception and tells me to look in the developer log, which I can’t do on iOS (unless some one has a trick for that…)

The code in question is this,

<%*
let theName = tp.file.title
let titleName = tp.date.now(“HHmm”) + " - " + theName
await tp.file.rename(titleName)
let baseFolder = “/Calendar/Meetings/”
let year = tp.date.now(‘YYYY’)
let month = tp.date.now(‘MM’)
let day = tp.date.now(‘D’)
let newFolder = ${baseFolder}${year} + “/” + ${month} + “/” + ${day} + “/”
await tp.file.move(newFolder + titleName);
%>

The nature of the failure varies.
Sometimes it just drops the note in the top level folder.
Sometimes it moves it to the right place, but then creates a second copy in the new place
Sometimes it moves it to the right place and puts the prefix timestamp and “-” on twice

It is trigger by QuickAdd on a Button, so thats where the title comes from.

All ideas gratefully received. (either debugging ideas or problem solving ideas)

Thanks

There is a plugin called logstravagansa, or something like that which supposedly catches the console log and stores it into a note. Try that, and see if it that helps you.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.