diff --git a/source/plg_system_t3/t3.php b/source/plg_system_t3/t3.php index 1642ced702..aeea38b536 100644 --- a/source/plg_system_t3/t3.php +++ b/source/plg_system_t3/t3.php @@ -137,7 +137,7 @@ function onContentPrepareForm($form, $data) $tmpl = T3::detect() ? T3::detect() : (T3::getDefaultTemplate() ? T3::getDefaultTemplate() : false); if($tmpl){ - $extended = JPATH_ROOT . '/templates/' . $tmpl . '/etc/form/' . $form->getName() . '.xml'; + $extended = JPATH_ROOT . '/templates/' . (is_object($tmpl) && !empty($tmpl->tplname) ? $tmpl->tplname : $tmpl) . '/etc/form/' . $form->getName() . '.xml'; if(is_file($extended)){ JFactory::getLanguage()->load('tpl_' . $tmpl, JPATH_SITE);