User warning: The following module is missing from the file system: module_filter. In order to fix this, put the module back in its original location. For more information, see the documentation page (link is external). in _drupal_trigger_error_with_delayed_logging() (line 1128 of E:\green-acorn\workspace\green-acorn-status-monitor\includes\bootstrap.inc).

Easy fix, just add a module_exists().

/**
 * Implements hook_js_alter().
 */
function adminimal_js_alter(&$javascript) {
  // Fix module filter available updates page.
  if (module_exists('module_filter') && isset($javascript[drupal_get_path('module','module_filter').'/js/update_status.js'])) {
    $javascript[drupal_get_path('module','module_filter').'/js/update_status.js']['data'] = drupal_get_path('theme', 'adminimal') . '/js/update_status.js';
  }
}
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

Alan D. created an issue. See original summary.

TommyChris’s picture

Works, please commit it!

T.Mardi’s picture

Works great, thank you.

Alan D.’s picture

Status: Active » Needs review
FileSize
832 bytes

Here's the patch since this error has been frequency noticed :)

I think this is related to changes in Drupal 7.50 error reporting, so affected users are likely to increase as users update.

JoelAddison’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #4 works. It would be great to get this in.

iryston’s picture

The patch in #4 works, thank you.

co2ncos1to’s picture

Ooo my.. it's work. Thank u

RarelyRed’s picture

It's not a matter if the module is enabled or even installed. I just spun up a clean 7.50 (on Pantheon) and added Adminimal - the error appeared without having ever installed Module Filter. If I deactivate Adminimal, the error disappears.

iryston’s picture

@RarelyRed The patch in #4 returns TRUE if the module is both installed and enabled, FALSE otherwise

Alan D.’s picture

There was a change in reporting with Drupal 7.50.

Drupal 7.44 and below, it would silently go, if module doesn't exist, return nothing, but now it actually reports an warning, hey your trying to get a path of something that doesn't exist. So calls to drupal_get_path() now need to be wrapped.

markdorison’s picture

Version: 7.x-1.24 » 7.x-1.x-dev

Patch in #4 works as expected.

choster’s picture

Another confirmation that #2763581-4: Error if module_filter not enabled (Drupal 7.50) does the trick.

jenlampton’s picture

+1 for RTBC

Alan D.’s picture

Priority: Minor » Normal

Bumping priority, starts to chock the log tables with messages if not resolved :(

thelmer’s picture

+1 for RTBC

Ambidex’s picture

Another positive result here, +1. Would love to see a quick release for this one.

annared’s picture

Hi,
i patched the theme but i still got the same error. Any idea?

Thanks

Alan D.’s picture

This part of the message? "The following module is missing from the file system: module_filter."

Look at all of your other modules and themes that have the string "module_filter", and that would be the likely cause. Totally useless info by default "line 1128 of includes\bootstrap.inc" to debugging via Drupal, unless you add a backtrace there to see where it gets called from.

blue_waters’s picture

The patch solved this for me as well.

rudam’s picture

#4 works!

calbasi’s picture

#4 works for me too

djalxs’s picture

Issue summary: View changes
FileSize
653 bytes

I have sightly modified the patch so as there aren't nested if conditional statements. Although it doesn't seem like much, nested conditionals take longer to process and if there are many little nested conditionals, eventually they all add up.

Alan D.’s picture

Status: Reviewed & tested by the community » Needs work

Calc diff of between 10ms and 42ms with 1,000,000 loops, which is like 0.000042ms per conditional. Lack of readability negates any benefit imho.

Watch the line length and coding standards, spaces between the dots etc.

aseabrook’s picture

Is anyone else encountering the following error?

User warning: The following theme is missing from the file system: adminimal_theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1128 of ...)

I applied the patch in #4 thinking that somehow it might resolve my above error as well but unfortunately it didn't.

I also attempted to remove the row in my db that mentions adaptive theme as per the Drupal docs (https://www.drupal.org/node/2487215) but that also didn't make a difference.

Alan D.’s picture

Unrelated: You must have removed (or moved) the theme. Same idea as a module, restoring the code for the theme first, then disable the theme. After that, you can delete the theme code without this warning

https://www.drupal.org/node/2487215

Or remove the line from the sites system directly via SQL (backup in case you delete the wrong line!)

Ambidex’s picture

Patch in #22 seems to contain a critical typo: modue_filter, which should obviously contain module_filter. No sure about the performance boost though, as noted in #23.

jjsanbra’s picture

Hi, were I got to paste de hook?

uno’s picture

I liked the theme and installed it, with plan to use it as replacement for Seven everywhere, but after seeing missing module_filter error, even on fresh installs, checked the theme files and found them bloated with module_filter references. Just take a look into js files, especially /js/update_status.js ...

I found out that after removing this file from the theme module_filter missing error disappears.

Since there is no reference to /js/update_status.js in theme's .info file, you'd have to remove lines 239 - 247 in template.php file, so that the following code is there no more:

/**
* Implements hook_js_alter().
*/
function adminimal_js_alter(&$javascript) {
// Fix module filter available updates page.
if (isset($javascript[drupal_get_path('module','module_filter').'/js/update_status.js'])) {
$javascript[drupal_get_path('module','module_filter').'/js/update_status.js']['data'] = drupal_get_path('theme', 'adminimal') . '/js/update_status.js';
}
}

Or, if you want to keep the code, just clear the line 241, by deleting */

Flush caches afterwards.

I found no problems after removing those lines, whatsoever.

Did not try to analyze whether this was an error or an effort, but if this was an effort to promote mentioned module, it is going to be counterproductive, both for the theme and the module.

Jaypan’s picture

Status: Needs work » Reviewed & tested by the community

Both the patch in #4 and #22 are good. I've was about to submit a patch and found this thread, and the patch I was to submit was identical to #22.

  • ANDiTKO committed de5b630 on 7.x-1.x authored by djalxs
    Issue #2763581 by Alan D., djalxs, Alan D.: Error if module_filter not...
ANDiTKO’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in latest version. Thank you all and especially @Alan D. and @djalxs for providing patches.

joelpittet’s picture

Status: Fixed » Needs review
Issue tags: +Quick fix
FileSize
694 bytes

There's a typo in this patch that got committed 'modue_filter' vs 'module_filter'

markdorison’s picture

Status: Needs review » Reviewed & tested by the community

Doh! Patch in #32 looks good.

kurkuma’s picture

Here is a patch for the stable release of the theme (7.x-1.24), for those ones that do not want or cannot use the dev version of the theme in production servers and do not want to have patches manually applied in their code.

Alan D.’s picture

rtbtc from me too, it's nice to see the space added back ") . '" ;)

gambry’s picture

Any chance to have this committed?

llslim’s picture

#34 works for me.

cavax’s picture

#34 works! thanks.

gateway69’s picture

why not push this change? :P