When configuring search (admin/config/search/settings) I have been annoyed by "missing module" reports naming many of my installed themes. The issue goes away when I disable Advanced Help, and reappears when Advanced Help is re-enabled. Clearing caches makes nmo difference.
Looking at advanced_help.module (version 7.x-1.3), at line 612 there is:
drupal_get_path('module', $module) . "/translations/help/$language->language",
as part of function advanced_help_get_topic_file_info($module, $topic).
The problem is that the argument $module can also refer to a theme - see line 823, array_merge(module_list(), list_themes()).
A quick and dirty fix is to insert a line before line 609, and modify the code as follows:
$module_type = in_array($module,array_keys(list_themes()))?'theme':'module';
$paths = array(
// Allow theme override.
path_to_theme() . '/help',
// Translations.
drupal_get_path($module_type, $module) . "/translations/help/$language->language",
// In same directory as .inc file.
$info['path'],
);
So that instead of hard-coding 'module' for drupal_get_path(), 'theme' can be used when appropriate.
Make that patch fixed the problem for me - so far at least.
Comment | File | Size | Author |
---|---|---|---|
#4 | missing_module-2960283-4.patch | 1.18 KB | emartoni |
Comments
Comment #2
gnugetHi.
Thanks for your report.
Would be great if you provide a patch considering that you already have a fix for this problem.
I will be glad to review it and commit it.
If you cannot I will give a try when I have time.
Thanks again!
Comment #3
emartoni CreditAttribution: emartoni at CI&T commentedComment #4
emartoni CreditAttribution: emartoni at CI&T commentedPatch attached!
Best,
Eduardo
Comment #5
gnugetThis looks and works great
I just noticed that this is happening on the 7.x version and I'm not the maintainer that Branch :-( but I will mark this as RTBC.
Thank you!
Comment #6
gisleThanks for the patch and the review. I'll look into this shortly.
Comment #8
gisleI was able to reproduce the bug and verify that the patch fixed it. Patch is now committed to the repo.