From ecc9dece9202b39c2a3e2eed24be9ba25c163dec Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 4 Dec 2014 15:51:59 +0000 Subject: [PATCH] throw an exceptin with a more maningful message if a template does not contain a template tag with an id attribute matching template name, eg. it was forgotten to rename when customizing --- etemplate/inc/class.etemplate_new.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/etemplate/inc/class.etemplate_new.inc.php b/etemplate/inc/class.etemplate_new.inc.php index 4eb5ddf6d7..f907de8cf5 100644 --- a/etemplate/inc/class.etemplate_new.inc.php +++ b/etemplate/inc/class.etemplate_new.inc.php @@ -121,6 +121,7 @@ class etemplate_new extends etemplate_widget_template // instanciate template to fill self::$request->sel_options for select-* widgets // not sure if we want to handle it this way, thought otherwise we will have a few ajax request for each dialog fetching predefined selectboxes $template = etemplate_widget_template::instance($this->name, $this->template_set, $this->version, $this->laod_via); + if (!$template) throw new egw_exception_assertion_failed("Template $this->name not instanciable! Maybe you forgot to rename template id."); $template->run('beforeSendToClient', array('', array('cont'=>$content))); // some apps (eg. InfoLog) set app_header only in get_rows depending on filter settings