HTMLExportTemplate resetting to none

Hi all,
I added via file>built-in templates>HTML the HTML templates.
In one of my working files it does not work when assigning template to a note.
Via export tab it defaults back to None, however I can select the template.
Also if I add the correct template to the attribute HTMLExportTemplate I still see under the export tab “This not has no HTML Export template”
Is this a bug?

If I create a new file with 1 note and add built in template it works fine.

Best, Paul

It’s unlikely to be a bug; this is an extremely well-tested and reliable part of Tinderbox.

Perhaps an agent or action is resetting the template? Sharing the file here is likely to lead to a prompt solution.

Thanks for your response. I included a test file.

Goto Note 1 the Export tab in the text pane selector
Select the export template ending with HTML page
—> It does not keep the value.
Remove separator “Templates”
Repeat steps with Note 1 and it works.

Looking forward to understand if I made a mistake somewhere.

Thanks for your help
TestExport.tbx (96.5 KB)

Aha! (This was tricky to see)

When you set the template of Note1 to HTML Page, Tinderbox remembers the path to find that template: /Templates/HTML page. But there’s a separator named Templates as well as the container! So Tinderbox looks inside the separator, finds no template named “HTML Page” and gives up. (It also displays an orange error warning that says you have a Missing export template for Note 1.)

So, rename or eliminate the separator and all will be well.

A tricky one indeed. I did not catch that one. It saved me a lot of additional time.
From now on I start all separators with "Section: " because I noticed that I tend to give the separator similar/same names then the first note after the separator.
Thanks again for you great support. Best, Paul.

A little extra pertinent info here. When Tinderbox expects one match and gets more than one match, it selects the first match by $OutlineOrder. Thus faced with this ambiguity:

…the result is as @eastgate describes., though I figure a picture will help some others reading this.

The $Path of both the separator and the actual template containers is the same /Templates. Remember that a separator is a note, just one shown in a special manner.

Given their very special purpose it is a good idea for both the Prototypes and Templates folder to leave them where they are and not use that $Name anywhere else. For the same reason of potential name classes it is also a good idea to make sure the title ($Name) of any individual prototype or template is also unique. That is why you will see many users adopt a practice of using a prefix letter or character (asterisk, underscore, etc.) at the start of the name. This has two useful effects. It reminds the user this note has a special purpose and it won’t get into a nameing collision as has occurred above.

HTH :slight_smile:

Thanks for that advice Mark, in addition to prototype and template, I also started to use a prefix (naming convention) for separators. However now understanding the issue, I hope I will “catch” it next time anyhow.

Great. The prefixing is a matter of choice. Some people find prefixes visually ugly. Others value not losing time to silent failures. So this is definitely an area where there’ no one ‘right’ way to do things!