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.

CommentFileSizeAuthor
#4 missing_module-2960283-4.patch1.18 KBemartoni

Comments

Peter Pulsifer created an issue. See original summary.

gnuget’s picture

Hi.

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!

emartoni’s picture

Assigned: Unassigned » emartoni
emartoni’s picture

Assigned: emartoni » Unassigned
Status: Active » Needs review
StatusFileSize
new1.18 KB

Patch attached!

Best,
Eduardo

gnuget’s picture

Status: Needs review » Reviewed & tested by the community

This 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!

gisle’s picture

Thanks for the patch and the review. I'll look into this shortly.

  • gisle committed 1558274 on 7.x-1.x authored by emartoni
    Issue #2960283 by emartoni: Fixed missing module error message
    
gisle’s picture

Status: Reviewed & tested by the community » Fixed

I was able to reproduce the bug and verify that the patch fixed it. Patch is now committed to the repo.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.