Skip to content

Uncaught errors when activated with Periodic Notes #1129

@michaelm2391

Description

@michaelm2391

Specs:

  • OS: Windows 10
  • Templater version: 1.16.0
  • Obsidian version: 1.3.5

I am receiving the following error in the console whenever I activate a new daily note using the Periodic Notes plugin:
Templater Error: Template parsing error, aborting. Unexpected identifier 'contents'

Templater is attempting to activate the following template. The only way to get the console to return no error is to activate the daily note without anything in this template; conversely, I've tried removing each line of code one-by-one, and in every such case it generates the error.

*Created: <% tp.file.creation_date() %>* 
*Modified: <% tp.file.last_modified_date() %>* 

<%* 
tR += "# 📆"; 
tR += tp.date.now("dddd DD MMMM Y") 
%>
<svg viewBox="0 0 3760 100">
  <title>Timeline 2022</title>
  <g class='bars'>
    <rect fill='#0066FF' x='0' width='310' height='25'></rect>
    <rect fill='#3366AA' x='320' width='280' height='25'></rect>
    <rect fill='#99AA33' x='610' width='310' height='25'></rect>
    <rect fill='#99EE33' x='930' width='300' height='25'></rect>
    <rect fill='green' x='1240' width='310' height='25'></rect>
    <rect fill='yellow' x='1560' width='300' height='25'></rect>
    <rect fill='gold' x='1870' width='310' height='25'></rect>
    <rect fill='cyan' x='2190' width='310' height='25'></rect>
    <rect fill='orange' x='2510' width='300' height='25'></rect>
    <rect fill='red' x='2820' width='310' height='25'></rect>
    <rect fill='brown' x='3140' width='300' height='25'></rect>
    <rect fill='white' x='3450' width='310' height='25'></rect>
  </g>
  <g class='labels' style="font-size:50px;" text-anchor="middle">
    <text fill='#747474' x='0' y='80' text-anchor="start">January</text>
    <text fill='#747474' x='320' y='80' text-anchor="start">February</text>
    <text fill='#747474' x='610' y='80' text-anchor="start">March</text>
    <text fill='#747474' x='930' y='80' text-anchor="start">April</text>
    <text fill='#747474' x='1240' y='80' text-anchor="start">May</text>
    <text fill='#747474' x='1560' y='80' text-anchor="start">June</text>
    <text fill='#747474' x='1870' y='80' text-anchor="start">July</text>
    <text fill='#747474' x='2190' y='80' text-anchor="start">August</text>
    <text fill='#747474' x='2510' y='80' text-anchor="start">September</text>
    <text fill='#747474' x='2820' y='80' text-anchor="start">October</text>
    <text fill='#747474' x='3140' y='80' text-anchor="start">November</text>
    <text fill='#747474' x='3450' y='80' text-anchor="start">December</text>
  </g>
  <g>
    <circle cx="{{date:DDD}}0" cy="14" r="15" stroke="black" fill="white" />
  </g>
</svg>

<%- tp.file.rename(tp.date.now("YY-MM-DD ddd DD MMM YY")) %>

## Agenda
- [ ] 08:00 Reading
- [ ] 10:00 Reading
- [ ] 17:00 Reading

## Today's notes:

## Carryovers

## To do

## From Google Calendar
<% tp.file.cursor() %>
<%* app.commands.executeCommandById("ics-plugin:import_events") %>

This template used to work fine until I began tinkering around with the Rollover Daily Todos plugin (which seems to be basically incompatible with Templater). I have since uninstalled that plugin, but alas I am still having issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions