Varialbles won't get interpolated using templater with periodic (weekly) notes

Hey there,

I use periodic notes in conjuction with templater.

While casting a daily note and computing stuff from the filename like this:

[!todo] Heute geplant

(path includes {{query.file.path}}) OR ( scheduled on <% tp.date.now("YYYY-MM-DD", 0, tp.file.title, "YY-MM-DD dd") %>)
not done
results
in 
> [!todo]  Heute geplant
> ```tasks
> (due on or before 2025-06-30) 
> not done
>```

the templater refuses to render the weekly template  and returns:

> [!todo]  Heute geplant
> ```tasks
> (path includes {{query.file.path}}) OR ( scheduled on <% tp.date.now("YYYY-MM-DD", 0, tp.file.title, "YY-MM-DD dd") %>)
> not done
> ``` 

For the dates I could use the periodic notes syntax, for more complicated stuff, I probably won't. Furthermore I dislike the thought to use different styles for the same stuff.
So far I found out that this is kind of timing issue and so some kind of sleep probably would to the trick but I have no clue how to achieve this or a another way to get rid of it.

Kind Regards
Zolto

And this happens on newly created notes with that template? Remember that changing a template after you’ve created the new won’t do anything to notes already created with any given template.

If it happens on newly created noted, verify tag your template setup is pointing to the correct template.

yes the code I pasted is part of a template which is triggered by periodic notes plugin.
The workflow is as follows: when I klick on a day/week in the calendar,the periodic notes plugin generates a new note and calls template I specified for it in the pnp.

If I click on a day the daily template is applied and the corresponding variables (not sure if the wording is correct) are interpolated just fine.

If I click on the weekly template the same variables e.g. tp.file.title don’t work.

My assumption that there’s a rece condition and the file is simply not yet named, doesn’t seem to be correct.
Not even
<%* tR += “test” %>
works on weekly template while there’s no issue on daily