Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question marks about {{tp_title_date}} #43

Closed
AngelusDomini opened this issue Jan 16, 2021 · 11 comments
Closed

Question marks about {{tp_title_date}} #43

AngelusDomini opened this issue Jan 16, 2021 · 11 comments
Assignees
Labels

Comments

@AngelusDomini
Copy link

@AngelusDomini AngelusDomini commented Jan 16, 2021

After reading and following some parts of the readme.md, I formatted my daily note template accordingly to get this:
{{tp_title_date:title_f="YYYY-MM-DD, ddd",f="MMMM D, YYYY; dddd"}}
From "2021-01-16, Sat" to "January 16, 2021; Saturday"

Is that the right format for the template or am I missing something?

I've tested this by creating future and past daily notes using the Calendar and Review plugins, plus used Templater to manually paste the template onto different daily notes… and the results are pretty confusing.

I would get the Error with Internal Template notification whenever I created a daily note using the Calendar plugin. I followed the notification and checked the console, which only told me about using the 'title_f' argument, so I might be using the argument wrong??

Using the Review plugin to create a daily note did not give the error, but the template showed today's date instead of the daily note's corresponding date.

And yet, when using Templater to paste the template, it works just fine. Tried this with a particular date a few months from now, yesterday and tomorrow's dates. It seems to work just fine when I manually add it to any daily note, so why not with other methods??

Hoping you'd help me with this "question" of mine. Was about to report it as a bug but I might embarrass myself if it turned out the problem was with the formatting of the arguments 😨 Much thanks and great work with the plugin!!

@SilentVoid13
Copy link
Owner

@SilentVoid13 SilentVoid13 commented Jan 17, 2021

Hello @AngelusDomini,
For the Daily notes and Calendar plugin, this should work. The title_f argument should be the same as the one specified in the Daily Notes core plugin settings. Are all your daily notes files in the format YYYY-MM-DD, ddd ?
The Review plugin isn't compatible with Templater {{tp_title_<...>}} templates because Templater tries to retrieve the active file title date but the Review plugin doesn't switch to the newly created file so Templater ends up retrieving a random file title.

@AngelusDomini
Copy link
Author

@AngelusDomini AngelusDomini commented Jan 17, 2021

Are all your daily notes files in the format YYYY-MM-DD, ddd ?

Yes, they are.

The Review plugin isn't compatible with Templater {{tp_title_<...>}} templates because Templater tries to retrieve the active file title date but the Review plugin doesn't switch to the newly created file so Templater ends up retrieving a random file title.

Ah I see. That's a bummer but at least I know now lol.

Did I actually get the format of the template right? I mean it definitely works when I manually add the template, just not with the Calendar plugin for some reason.

@SilentVoid13
Copy link
Owner

@SilentVoid13 SilentVoid13 commented Jan 17, 2021

That's really weird, just tested it with a fresh new test vault and this is working perfectly. Try disabling / re-enabling the plugin or maybe uninstall / reinstall. Your format is correct, is it not working on both daily note and calendar ?

test_demo.mp4

@luckman212
Copy link

@luckman212 luckman212 commented Jan 17, 2021

I had a problem too with the last update, a few of the title templates were not working, and reloading didn't work. I was about to file a bug but I tried fully quitting and restarting Obsidian and that got everything working again.

@AngelusDomini
Copy link
Author

@AngelusDomini AngelusDomini commented Jan 21, 2021

Sorry for the very late reply.

I was supposed to reply saying that the problem persisted, and it certainly did… except when I don't hold the Cmd button to create the daily note in the Calendar plugin.

This whole time I have been holding the Cmd button in order to open the newly created daily note on another pane. If it turned out the whole time that Cmd + clicking the Calendar plugin did something more than open the daily note on another pane, then I apologize for wasting your time 🙏. But I think it's still a bug from either Templater or Calendar. As I've said, the problem still persists when I Cmd+click to create a daily note, but not when I'm just opening from the currently active pane.

I tried reinstalling the plugin and I've pretty much quit Obsidian and shut down my laptop a couple of times these past days. To explain the bug in further detail, it's rather unpredictable. Depending on the day that I decide to create from the Calendar plugin, it will either show the error or input the wrong date. Future daily notes input tomorrow's date (sometimes today's date). I deleted and recreated today's daily note to test, and this time it showed the correct date (perhaps because I didn't open it on another pane). But I created a past date (I created the daily note for Jan 1 which I didn't have)—again using the Calendar plugin, which showed today's date.

As you've said, it's really weird. But at the very least, it works when I'm not opening in another pane. Is this the case for you also? Any other info I can give that might help?

@meskill
Copy link

@meskill meskill commented Apr 6, 2021

extending @AngelusDomini observations.
when using Calendar plugin and a internal_template based on title, these steps will lead to Internal_Template_Error in newly created files:

  • clicking on date without daily note with Cmd\Ctrl button to open newly created note in new pane
  • having pinned pane and just clicking on date without daily

As Review plugin doesn't work well with templater also question is - is this problem more with other plugins like Calendar, Review and how it can be fixed

maybe plugins which creates new notes should be focusing newly created note or smth

@SilentVoid13
Copy link
Owner

@SilentVoid13 SilentVoid13 commented Apr 6, 2021

Hey @meskill, Templater was completely revamped. It now has a new syntax, you'll need to update your existing templates.
This update should fix a lot of things, Templater should now be compatible with the Review plugin for example.
Try to update and tell me if this fixes any of the problems you mentioned.

@SilentVoid13
Copy link
Owner

@SilentVoid13 SilentVoid13 commented Apr 6, 2021

Hey @AngelusDomini, sorry for the very late reply.
As explained in my previous message, Templater had a huge update.
This should fix a lot of things, could you update to Templater's latest version, update your existing templates with the new syntax and tell me if the bug still persists ?
Tell me if something goes wrong.

@meskill
Copy link

@meskill meskill commented Apr 6, 2021

@SilentVoid13 yes, last version works great with review and calendar plugins

Great work, Thank You!

@AngelusDomini
Copy link
Author

@AngelusDomini AngelusDomini commented Apr 7, 2021

Yes, it works now! Though, if I may complain just a little more, Cmd+clicking on a daily note on Calendar plugin, though it opens it as a new pane (with the right template now), it doesn't switch to it as the active pane. That said, I don't think this is Templater's fault lelz

Anyway, thank you so much for everything @SilentVoid13! Really appreciate it 😁

EDIT: Also glad that the plugin is working well with Review now!

@SilentVoid13
Copy link
Owner

@SilentVoid13 SilentVoid13 commented Apr 7, 2021

@AngelusDomini Glad to hear it's working now!

You're right, the active pane issue is not a Templater thing, maybe you can open a feature request on Calendar's github page to be able to do this.

Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants