Since Drupal 7.50 we've seen more warnings about missing module files.

In my case it was for modules with a disabled status that were long gone ...

So I added an extra drush command to cleanup those records instead of just listing them.

CommentFileSizeAuthor
#2 option_to_cleanup-2766445-2.patch3.36 KBhelmo

Comments

helmo created an issue. See original summary.

helmo’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new3.36 KB

  • helmo committed 87cc321 on 7.x-1.x
    Issue #2766445 by helmo: Option to remove missing modules
    
helmo’s picture

Status: Needs review » Fixed

I've added the cleanup option also to the Drupal frontend. And committed, see #3

Peters196’s picture

This module is not fixing my problem with missing module errors updating to 7.50!
Updating from 7.44 to 7.50 I get numerous warnings of the form:
User warning: The following module is missing from the file system: invisimail. In order to fix this, put the module back in its original location.
Having installed this module, if I look at the status report I see:
Check for missing modules in filesystem - No missing modules detected.
even though the missing modules are listed in the System table in the database.
Looking at your code snippets for the option to remove/clean up the missing modules, if I am reading your code correctly what you do is to identify the missing module by looking at the 'Status' field to see if it set to 1 indicating that it is enabled; and to remove/clean it up by clearing this flag to zero.
Looking at my System table I see that the Status field is already zero for all the missing modules which presumably explains why I get the 'No missing modules detected' report.

This suggests that the Drupal Update.php is looking for something more than a zero status field for a missing module to say there is not a problem with it. Without debugging Update.php (which I would probably find impossible) I don't know what else it needs. Would deleting the whole record work? or would that have implications elsewhere? I don't know, but I hope somebody does because my site is out of action until a solution is found

Peters196’s picture

Priority: Normal » Major
Status: Fixed » Needs work
helmo’s picture

@Peters196 did you use the 1.0 version from 2013? This issue update did not make it into a release yet.

I've now created a 1.1 release which does include it.

Peters196’s picture

I downloaded the only version available yesterday, which was 1.0. Looking today I now see as the only version - version 1.1!
I uploaded 1.1 to my website and it does now list the sixteen modules which had been identified as missing.
However, when I click the 'Remove' link I get:
Internal Server Error:The server encountered an internal error or misconfiguration and was unable to complete your request.

Could I suggest that, after fixing the problem, that where you give the list of missing modules you give the name of the module rather than just a link to the module on the Drupal website

  • helmo committed 19656f5 on 7.x-1.x
    Issue #2766445 by helmo: Restore module name and path in the list on...
helmo’s picture

Status: Needs work » Needs review

@Peters196 can you get the actual error message from your webserver's log? It's working OK in my test setups.

Thanks for the pointer about the missing name in the list... that was a regression, it used to be there. And if you update to the latest dev version it's back again.

Peters196’s picture

I'm not sure what I'm looking for, but the server log only logs the latest 25 errors and I appear to be getting an extremely large number of errors - more than twenty five a second!!!
Capturing the log immediately after attempting to delete a module the errors listed include 'r->uri', 'redirected from r->uri', 'Zlib compressed 538 to 235' and 'File does not exist: /domains/b/e/...../public_html/favicon.ico
I don't suppose any of this is any help to you! Sorry!

helmo’s picture

Status: Needs review » Fixed

OK, then lets call this issue fixed.

On most systems the error logs is also saved to disk... I suggest you look it up and try to reduce that :)

Please open a new issue if you keep having trouble with this module.

Status: Fixed » Closed (fixed)

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