From 35e8d5bc21672e97e3607cb12bc44223a3991c12 Mon Sep 17 00:00:00 2001 From: DuruBayram Date: Fri, 3 Aug 2018 13:34:18 +0300 Subject: [PATCH 1/4] it shows that description of error to add new error type --- .../components/com_config/Controller/ApplicationController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/administrator/components/com_config/Controller/ApplicationController.php b/administrator/components/com_config/Controller/ApplicationController.php index 193fe8ef760ef..38ff423ef7d8d 100644 --- a/administrator/components/com_config/Controller/ApplicationController.php +++ b/administrator/components/com_config/Controller/ApplicationController.php @@ -119,7 +119,8 @@ public function save() */ // Redirect back to the edit screen. - $this->setRedirect(Route::_('index.php?option=com_config', false)); + $this->app->enqueueMessage(\JText::_('COM_CONFIG_ERROR_VALIDATION'), 'error'); + $this->app->redirect(\JRoute::_('index.php?option=com_config', false)); } // Attempt to save the configuration. From 9b291d9f7d4e32f8c23cef11d3f0236848f13a6b Mon Sep 17 00:00:00 2001 From: DuruBayram Date: Fri, 3 Aug 2018 14:53:42 +0300 Subject: [PATCH 2/4] Added language string --- administrator/language/en-GB/en-GB.com_config.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/administrator/language/en-GB/en-GB.com_config.ini b/administrator/language/en-GB/en-GB.com_config.ini index 18a2c6ec381ed..3b9f46a606714 100644 --- a/administrator/language/en-GB/en-GB.com_config.ini +++ b/administrator/language/en-GB/en-GB.com_config.ini @@ -25,6 +25,7 @@ COM_CONFIG_ERROR_ROOT_ASSET_NOT_FOUND="The asset for global configuration could COM_CONFIG_ERROR_SSL_NOT_AVAILABLE="HTTPS has not been enabled as it is not available on this server. HTTPS connection test failed with the following error: %s" COM_CONFIG_ERROR_SSL_NOT_AVAILABLE_HTTP_CODE="HTTPS version of the site returned an invalid HTTP status code." COM_CONFIG_ERROR_REMOVING_SUPER_ADMIN="You can't remove your own Super User permissions." +COM_CONFIG_ERROR_VALIDATION="Form validation failed. Please check the form." COM_CONFIG_ERROR_WRITE_FAILED="Could not write to the configuration file" COM_CONFIG_FIELD_CACHE_HANDLER_LABEL="Cache Handler" COM_CONFIG_FIELD_CACHE_PLATFORMPREFIX_LABEL="Platform Specific Caching" From 48590f87047eb2f314db293b827611aa7295126b Mon Sep 17 00:00:00 2001 From: Duru Bayram Date: Sat, 4 Aug 2018 13:34:23 +0300 Subject: [PATCH 3/4] Update ApplicationController.php --- .../components/com_config/Controller/ApplicationController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/administrator/components/com_config/Controller/ApplicationController.php b/administrator/components/com_config/Controller/ApplicationController.php index 38ff423ef7d8d..5709d0ee15d3f 100644 --- a/administrator/components/com_config/Controller/ApplicationController.php +++ b/administrator/components/com_config/Controller/ApplicationController.php @@ -119,7 +119,7 @@ public function save() */ // Redirect back to the edit screen. - $this->app->enqueueMessage(\JText::_('COM_CONFIG_ERROR_VALIDATION'), 'error'); + $this->app->enqueueMessage(Text::_('COM_CONFIG_ERROR_VALIDATION'), 'error'); $this->app->redirect(\JRoute::_('index.php?option=com_config', false)); } From 66962a22546507b75ee912ee0a48787e182b4e60 Mon Sep 17 00:00:00 2001 From: George Wilson Date: Mon, 6 Aug 2018 10:13:26 +0100 Subject: [PATCH 4/4] Fix tabs and use namespaced class --- .../com_config/Controller/ApplicationController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/administrator/components/com_config/Controller/ApplicationController.php b/administrator/components/com_config/Controller/ApplicationController.php index 5709d0ee15d3f..b41afa4041c3a 100644 --- a/administrator/components/com_config/Controller/ApplicationController.php +++ b/administrator/components/com_config/Controller/ApplicationController.php @@ -119,8 +119,8 @@ public function save() */ // Redirect back to the edit screen. - $this->app->enqueueMessage(Text::_('COM_CONFIG_ERROR_VALIDATION'), 'error'); - $this->app->redirect(\JRoute::_('index.php?option=com_config', false)); + $this->app->enqueueMessage(Text::_('COM_CONFIG_ERROR_VALIDATION'), 'error'); + $this->app->redirect(Route::_('index.php?option=com_config', false)); } // Attempt to save the configuration.