XF 2.2 How to get rid of "Template is unknown" error

FoxSecrets

Active member
I uninstalled the add-on and am still getting the error below
  • Template public:xxxxxxxxxxxxx: [E_USER_WARNING] Template public:xxxxxxxxxxxxx is unknown (src/XF/Template/Templater.php:689
How to get rid of it without building the XF again?
 
Should not. Never has on mine.
And I’ve got quite a few customizations. You just have to make sure you have the button to rebuild shown.

Screen Shot 2023-07-08 at 11.57.23 PM.webp

Do NOT click on the click here link to do a fresh install.
 
I uninstalled the add-on and am still getting the error below
  • Template public:xxxxxxxxxxxxx: [E_USER_WARNING] Template public:xxxxxxxxxxxxx is unknown (src/XF/Template/Templater.php:689
How to get rid of it without building the XF again?
You better check your code in add-ons if that template is being called somewhere else, try searching the src/addons folder files and also perform a search in your templates to check if that template is being called somewhere.

Or you can share the complete error, then most probably can help you in much far better way.
 
Last edited:
You better check your code in add-ons if that template is being called somewhere else, try searching the src/addons folder files and also perform a search in your templates to check if that template is being called somewhere.

Or you can share the complete error, then most probably can help you in much far better way.

Here is the complete error. I've checked PAGE_CONTAINER but not found any mention to the template. Any suggestion?


Code:
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/cshcwrepu...', 689, Array)
#1 src/XF/Template/Templater.php(689): trigger_error('Template public...', 512)
#2 src/XF/Template/Templater.php(1618): XF\Template\Templater->getTemplateData('public', 'fox_beta_trans...')
#3 src/XF/Template/Templater.php(1680): XF\Template\Templater->renderTemplate('fox_beta_trans...', Array)
#4 internal_data/code_cache/templates/l1/s10/public/cxf_top_navigation_visitor.php(10): XF\Template\Templater->includeTemplate('public:fox_supe...', Array)
#5 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(Iconify\Iconify\Template\Templater), Array, NULL)
#6 src/XF/Template/Templater.php(1680): XF\Template\Templater->renderTemplate('cxf_top_navigat...', Array)
#7 internal_data/code_cache/templates/l1/s10/public/cxf_top_navigation.php(21): XF\Template\Templater->includeTemplate('public:cxf_top_...', Array)
#8 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(Iconify\Iconify\Template\Templater), Array, NULL)
#9 src/XF/Template/Templater.php(1680): XF\Template\Templater->renderTemplate('cxf_top_navigat...', Array)
#10 internal_data/code_cache/templates/l1/s10/public/PAGE_CONTAINER.php(1074): XF\Template\Templater->includeTemplate('public:cxf_top_...', Array)
#11 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(Iconify\Iconify\Template\Templater), Array, NULL)
#12 src/XF/Pub/App.php(564): XF\Template\Templater->renderTemplate('PAGE_CONTAINER', Array)
#13 src/XF/App.php(2149): XF\Pub\App->renderPageHtml('




    ...', Array, Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
#14 src/XF/Mvc/Dispatcher.php(404): XF\App->renderPage('




    ...', Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
#15 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#16 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#17 src/XF.php(517): XF\App->run()
#18 index.php(20): XF::runApp('XF\\Pub\\App')
#19 {main}
 
You apparently have a 3rd party add-on involved?

#7 internal_data/code_cache/templates/l1/s10/public/cxf_top_navigation.php(21): XF\Template\Templater->includeTemplate('public:cxf_top_...', Array)


Maybe you need to contact that developer in that add-on discussion thread?
 
#2 src/XF/Template/Templater.php(1618): XF\Template\Templater->getTemplateData('public', 'fox_beta_trans...')
  • Template public:xxxxxxxxxxxxx: [E_USER_WARNING] Template public:xxxxxxxxxxxxx is unknown (src/XF/Template/Templater.php:689
Still the error is incomplete as template name is something that we don't know. Though, just perform a search in templates under appearance tab for the template that is mentioned in this error, you will have your template in which the template is included Or you will need to check of template modifications that you have created that include that template.
 
Still the error is incomplete as template name is something that we don't know. Though, just perform a search in templates under appearance tab for the template that is mentioned in this error, you will have your template in which the template is included Or you will need to check of template modifications that you have created that include that template.
And that's been known to be an issue with poorly coded add-ons in the past, even causing issues after being removed... the stack trace points to a specific add-on in it.
#7 internal_data/code_cache/templates/l1/s10/public/cxf_top_navigation.php(21): XF\Template\Templater->includeTemplate('public:cxf_top_...', Array)
THAT is the first place that needs to be addressed.
 
And that's been known to be an issue with poorly coded add-ons in the past, even causing issues after being removed... the stack trace points to a specific add-on in it.
#7 internal_data/code_cache/templates/l1/s10/public/cxf_top_navigation.php(21): XF\Template\Templater->includeTemplate('public:cxf_top_...', Array)
THAT is the first place that needs to be addressed.
It is not always the add-ons. I know sometimes we ourselves make changes and then we forget what we have implemented
src/XF/Template/Templater.php(1618): XF\Template\Templater->getTemplateData('public', 'fox_beta_trans...')
No I'm not sure here which template relate to fox_

Can't always blame the developers/third party devs directly in any way.
 
Can't always blame the developers/third party devs directly in any way.
Generally... if an add-on is in the stack trace... that is the FIRST place to look for assistance.

No I'm not sure here which template relate to fox_
This could easily be related to either a custom BBCode or something from an add-on.

But once more... when an add-on is SPECIFICALLY highlighted in the stack trace.. that is the FIRST place to start investigating.
 
The "fox" prefix is the add-on that I'm developing and I've put in a html tag of "cxf_top_nav..".

The add-on is deleted, I rebuilt and the error persists, looks like some kind of trash, but it happen only on a specific theme, not on the standard XF. That's weird! I also searched in templates and no mention of that name.

Is there any cached folder which stores templates?
 
but it happen only on a specific theme
If it happening with a specific theme... they may have template modifications in play that are not being taken into consideration by your add-on, especially if it's hardcoded to look for a specific entry in a template and modify.
Check your ACP->Appearance->Template Modifications to see if there is anything listed that messes with the whatever template you are trying to address.
 
If it happening with a specific theme... they may have template modifications in play that are not being taken into consideration by your add-on, especially if it's hardcoded to look for a specific entry in a template and modify.
Check your ACP->Appearance->Template Modifications to see if there is anything listed that messes with the whatever template you are trying to address.
There is no related template modification since I deleted the add-on. By the way, how is the error still shown if the add-on has been deleted? That's why I think that's some cache issue.

Any other suggestion?
 
Opcode cache?
Have you restarted your PHP process for the HTTP server?
I use CloudFlare and have upon occasion found I needed to clear its cache also.
 
Well, I have already restarted but the error is still present.
Add-on deleted, maybe this message is coming from some system file?
I deleted some references in database from table xf_admin_log, xf_templates and xf_error_log, but still the same. That's something from XF, but have no idea what.
 
Top Bottom