XF 2.0 Template error: Template public:alert_post_insert_dp is unknown

Recep Baltaş

Well-known member
I have this error on my admin dashboard.

ErrorException: Template error: Template public:alert_post_insert_dp is unknown
src/XF/Template/Templater.php:582

Code:
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Template public...', '/home/technopa/...', 582, Array)
#1 src/XF/Template/Templater.php(582): trigger_error('Template public...', 512)
#2 src/XF/Template/Templater.php(537): XF\Template\Templater->getTemplateData('public', 'alert_post_inse...')
#3 src/XF/Template/Templater.php(1247): XF\Template\Templater->getTemplateCode('public', 'alert_post_inse...')
#4 src/XF/Alert/AbstractHandler.php(67): XF\Template\Templater->renderTemplate('alert_post_inse...', Array)
#5 src/XF/Entity/UserAlert.php(67): XF\Alert\AbstractHandler->render(Object(Tapatalk\XF\Entity\UserAlert))
#6 [internal function]: XF\Entity\UserAlert->render()
#7 src/XF/Template/Templater.php(938): call_user_func_array(Array, Array)
#8 internal_data/code_cache/templates/l2/s1/public/alert_macros.php(42): XF\Template\Templater->method(Object(Tapatalk\XF\Entity\UserAlert), 'render', Array)
#9 src/XF/Template/Templater.php(661): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array, Array)
#10 internal_data/code_cache/templates/l2/s1/public/account_alerts.php(35): XF\Template\Templater->callMacro('alert_macros', 'row', Array, Array)
#11 src/XF/Template/Templater.php(1248): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array)
#12 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('account_alerts', Array)
#13 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#14 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Html->renderView('XF:Account\\Aler...', 'public:account_...', Array)
#15 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#16 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#17 src/XF/App.php(1891): XF\Mvc\Dispatcher->run()
#18 src/XF.php(328): XF\App->run()
#19 index.php(13): XF::runApp('XF\\Pub\\App')
#20 {main}
Code:
array(4) {
  ["url"] => string(20) "/sosyal/hesap/alerts"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 

S Thomas

Well-known member
Well, that pretty obviously looks like an add-on messing up some stuff. You could just grep / search in all of your add-on files (/src/addons/) for alert_post_insert_dp to find out which add-on that is. Or just disable all and enable them one by one.
 

maxicep

Active member
Did you fixed the error @Recep Baltaş ?

Because i have same problem and getting that error rarely.

Well, that pretty obviously looks like an add-on messing up some stuff. You could just grep / search in all of your add-on files (/src/addons/) for alert_post_insert_dp to find out which add-on that is. Or just disable all and enable them one by one.
I've tried it but there is no an add-on which includes that text.
 

Snog

Well-known member
Look for insert_dp or dp. The "alert_post_" part is automatically generated when an alert is processed and isn't part of the alert system call.

For example:
$this->basicAlert($user, $post->user_id, $post->username, 'post', $post->post_id, 'privatethread');

Would use the template:
alert_post_privatethread

And if that template doesn't exist, you would get the error in the first post.
 
Top