I installed htmlarea and it was silently failing until I debugged and found out that module_list() was trying to load from the wrong directory.

This patch simply adds an else statement to the file_exists() check and spits out a watchdog error if the module file cannot be loaded.

CommentFileSizeAuthor
module-file-missing.patch634 bytessamo

Comments

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

looks good. this has bitten me too. with the sites dir we now have a few choices about where to put modules/themes. easy for drupal and admin to get confused.

dries’s picture

I don't know when this would happen/trigger. How to reproduce?

moshe weitzman’s picture

Lets say that you launch with just 1 site and put your contrib module packages in /modules. Then you go multi-site and move the packages to sites//modules as your location. Your modules will not load and admin gets confused. I'm not sure if the modules checkbox will be checked or unchecked in this case. Still, a watchdog is useful as an indication whenever an active module is unabel to be found. thats a significant error condition.

samo’s picture

My scenario was very similar to Moshe's: I installed htmlarea under modules, then removed htmlarea, several months later I re-installed htmlarea under modules/htmlarea.

dries’s picture

Steve Simms’s picture

Yes, this appears to be the same problem, with different solutions. I think a combination of both would be good.

Should this patch also remove the entry from the system table? Otherwise, it could produce a lot of watchdog messages, with no way of getting rid of them except putting the module/theme back (which may not be desirable) or editing the system table by hand (which may not be possible, and definitely wouldn't be desirable).

What would be the consequences of removing the entry?

dries’s picture

Please mark one of the issues as duplicate, and continue with one issue instead. Let's go with the solution that has the smallest performance penalty, or that is otherwise considered to be cleanest. I want you guys to figure out the best approach. :)

Zen’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

Marking this issue as the dupe.

-K