Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More useful message when "Force HTTPS" config save fails (because of HTTPS config issues) #12465

Merged
merged 6 commits into from Nov 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions administrator/components/com_config/model/application.php
Expand Up @@ -143,7 +143,7 @@ public function save($data)
// If available in HTTPS check also the status code.
if (!in_array($response->code, array(200, 503, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 401), true))
{
throw new RuntimeException('HTTPS version of the site returned an invalid HTTP status code.');
throw new RuntimeException(JText::_('COM_CONFIG_ERROR_SSL_NOT_AVAILABLE_HTTP_CODE'));
}
}
catch (RuntimeException $e)
Expand All @@ -154,7 +154,7 @@ public function save($data)
$app->setUserState('com_config.config.global.data.force_ssl', 0);

// Inform the user
$app->enqueueMessage(JText::_('COM_CONFIG_ERROR_SSL_NOT_AVAILABLE'), 'warning');
$app->enqueueMessage(JText::sprintf('COM_CONFIG_ERROR_SSL_NOT_AVAILABLE', $e->getMessage()), 'warning');
}
}

Expand Down
3 changes: 2 additions & 1 deletion administrator/language/en-GB/en-GB.com_config.ini
Expand Up @@ -29,7 +29,8 @@ COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTWRITABLE="Could not make configuration.php
COM_CONFIG_ERROR_HELPREFRESH_ERROR_STORE="The new Help Sites list could not be saved."
COM_CONFIG_ERROR_HELPREFRESH_FETCH="The current Help Sites list could not be fetched from the remote server."
COM_CONFIG_ERROR_ROOT_ASSET_NOT_FOUND="The asset for global configuration could not be found. Permissions have not been saved."
COM_CONFIG_ERROR_SSL_NOT_AVAILABLE="HTTPS has not been enabled as it is not available on this server."
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: <em>%s</em>"
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_WRITE_FAILED="Could not write to the configuration file"
COM_CONFIG_FIELD_CACHE_HANDLER_DESC="Choose the cache handler. Native caching mechanism is file-based. Please make sure the cache folders are writable."
Expand Down