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).
There is a technique that has been used of doing a module_load_include on the (non-existent) content module in order to load root Drupal include files (see #2762675: The following module is missing from the file system: content.. Because of the above change, this is no longer advisable. Such includes should instead be done as:
require_once DRUPAL_ROOT . '/(pathname to include file)';
modules/crm_core_data_import/plugins/conversion/CRMCoreConversionHandler.inc
The code in function countryCode
module_load_include('inc', 'content', 'includes/locale');
should be
require_once DRUPAL_ROOT . '/includes/locale.inc';
Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#2 | crm_core-Fix_module_load_include_on_content_module-2765917-2.patch | 1.13 KB | Ben Coleman |
Comments
Comment #2
Ben Coleman CreditAttribution: Ben Coleman at Accelerated Design, Inc. commentedThe attached patch fixes the above problem.
Comment #3
Ben Coleman CreditAttribution: Ben Coleman at Accelerated Design, Inc. commentedComment #4
bobburns CreditAttribution: bobburns commentedIf you have Ubercart installed check => https://www.drupal.org/files/issues/2763555-4.patch
Comment #5
Ben Coleman CreditAttribution: Ben Coleman at Accelerated Design, Inc. commentedYeah, I caught that already, and it's installed. I ended up searching all of the contrib modules on one of my sites that was getting this, and CRM Core was one that came up. It's not likely to be the cause of the warning popping up on my site (given that the code is in a plugin), but it will pop up if someone uses that plugin, so it might as well be fixed.
Comment #7
RoSk0Thanks for the patch!
Replaced "require" with "include" as core suggesting.