Drupal 7.50 generates a warning if a function like module_load_include() references a module that does not exist (see https://www.drupal.org/node/2487215 and https://www.drupal.org/node/2581445).

The first line of the uc_product_uc_store_status() function in uc_product.module is:

module_load_include('inc', 'content', 'includes/content.crud');

The content module was part of CCK in Drupal 6, so this module is not installed on a Drupal 7 site. As a result, this warning appears on certain admin pages:

User warning: The following module is missing from the file system: content. In order to fix this, put the module back in its original location. For more information, see the documentation page. in trigger_error() (line 1128 of /home1/rentnet/public_html/dev/includes/bootstrap.inc).

As far as I can tell, none of the code in the uc_product_uc_store_status() function depends on a function that would have been found in content.crud.inc, so the offending call to module_load_include() can be deleted without issue.

Members fund testing for the Drupal project. Drupal Association Learn more


markdatter created an issue. See original summary.

felribeiro’s picture

Status: Active » Needs review
541 bytes
TR’s picture

Status: Needs review » Needs work

Drupal core issue #1081266: Avoid re-scanning module directory when a filename or a module is missing, committed on 4 July, changed the behaviour of module_load_include() so it no longer fails silently when loading a non-existent file. Drupal 7.50 was released 3 days later. That's what exposed these lines of legacy D6 code in Ubercart (which do nothing in D7 but also don't hurt anything). That code has been there and failing silently for more than 6 years now!

There are actually two places that try to load that include - your patch only fixes one of the two. Can you roll a new patch to fix both?

felribeiro’s picture

Status: Needs work » Needs review
1.15 KB

Removing both places.

  • TR committed fb41589 on 7.x-3.x authored by felribeiro
    Issue #2763555 by felribeiro: Fix content module missing warning in...
TR’s picture

Status: Needs review » Fixed

Committed. Thanks!

Status: Fixed » Closed (fixed)

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