• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Awaiting feedback Template Error

Affected version
2.0

silence

Well-known member
#1
If you have the template metadata file for an add-on include a template that does not exist and install the add-on, you'll get an error on every page about the template not existing.
 

Chris D

XenForo developer
Staff member
#2
I'm not totally sure you've diagnosed the situation correctly as an entry in the _output/templates/_metadata.json file shouldn't ever be referenced in that way. We only use the metadata file to compare hashes for the template watcher system and track the version ID and version string changes across version changes.

Essentially if an entry exists in the _metadata.json file, then it would be ignored. It isn't an inventory of what should be imported during add-on install or anything like that.

If you get an error on a page about a template not existing then it would usually mean that page is attempting to render that template. Is it possible you have a template modification trying to render that template, or a code event listener?
 

silence

Well-known member
#3
I'm not totally sure you've diagnosed the situation correctly as an entry in the _output/templates/_metadata.json file shouldn't ever be referenced in that way. We only use the metadata file to compare hashes for the template watcher system and track the version ID and version string changes across version changes.

Essentially if an entry exists in the _metadata.json file, then it would be ignored. It isn't an inventory of what should be imported during add-on install or anything like that.

If you get an error on a page about a template not existing then it would usually mean that page is attempting to render that template. Is it possible you have a template modification trying to render that template, or a code event listener?
Yeah that was the first thing I checked. I had to reinstall XF2 in order to solve the issue and once the add-on was installed it did not pop up again.
 

silence

Well-known member
#7
Did this happen with Developer Preview 10 or an earlier version?
Developer Preview 10, I believe I removed the template and did a build release of it without specifically exporting the output (although the docs say doing the release will also trigger the export as well) and the issue arose.
 

Mike

XenForo developer
Staff member
#9
Is this still happening? If so, can you give specific reproduction steps and specific error messages being seen? (With a backtrace if possible -- most templater errors should be logged in the ACP now too.)