The link to /admin/help/locale is always shown after adding a language, but it shows a 404

CommentFileSizeAuthor
#1 569144.patch2.35 KBattiks

Comments

attiks’s picture

Status: Active » Needs review
StatusFileSize
new2.35 KB

for reference error in /includes/locale.inc line 332 and on line 339, I added module_exists to make sure the help module is enabled

Status: Needs review » Needs work

The last submitted patch failed testing.

sivaji_ganesh_jojodae’s picture

Title: Link to locale help page when help module is disabled » Link to module's help page returns "page not found" when help module is disabled

I don't think it makes sense to check whenever help page is referred.

Like

if (module_exists('help')) {
}

With this approach at any time we need two versions of status message which is overhead,

+    if (module_exists('help')) {
+      drupal_set_message(t('The language %language has been created and can now be used. More information is available on the <a href="@locale-help">help screen</a>.', array('%language' => t($form_state['values']['name']), '@locale-help' => url('admin/help/locale'))));
+    }
+    else {
+      drupal_set_message(t('The language %language has been created and can now be used', array('%language' => t($form_state['values']['name']))));
+    }

Better fix for this would be to add a warning message in help_uninstall().

Modules may refer help page when they are enabled or configured. Disabling help module will produce "page not found" error when they are referred. It is recommended to keep the help module enabled.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.