diff --git a/administrator/components/com_templates/src/View/Template/HtmlView.php b/administrator/components/com_templates/src/View/Template/HtmlView.php index f0b21dca56f24..e3a0e7bf7b436 100644 --- a/administrator/components/com_templates/src/View/Template/HtmlView.php +++ b/administrator/components/com_templates/src/View/Template/HtmlView.php @@ -173,8 +173,16 @@ public function display($tpl = null) } elseif (in_array($ext, $imageTypes)) { - $this->image = $this->get('Image'); - $this->type = 'image'; + try + { + $this->image = $this->get('Image'); + $this->type = 'image'; + } + catch (\RuntimeException $exception) + { + $app->enqueueMessage(Text::_('COM_TEMPLATES_GD_EXTENSION_NOT_AVAILALE')); + $this->type = 'home'; + } } elseif (in_array($ext, $fontTypes)) { diff --git a/administrator/language/en-GB/com_templates.ini b/administrator/language/en-GB/com_templates.ini index 30f7b02100685..e907cad24f9c1 100644 --- a/administrator/language/en-GB/com_templates.ini +++ b/administrator/language/en-GB/com_templates.ini @@ -125,6 +125,7 @@ COM_TEMPLATES_FOLDER_NAME="Folder Name" COM_TEMPLATES_FOLDER_NOT_EXISTS="The folder does not exist." COM_TEMPLATES_FTP_DESC="For updating the template source files, Joomla will most likely need your FTP account details. Please enter them in the form fields below." COM_TEMPLATES_FTP_TITLE="FTP Login Details" +COM_TEMPLATES_GD_EXTENSION_NOT_AVAILALE="The GD extension for PHP is not available.
In order to manipulate images you need additional extensions installed on your server. See the Official Technical Requirements documentation for more details." COM_TEMPLATES_GRID_UNSET_LANGUAGE="Unset %s Default" COM_TEMPLATES_HEADING_ASSIGNED="Assigned" COM_TEMPLATES_HEADING_DEFAULT="Default"