diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index ce872d4..5eeaf3c 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -251,6 +251,9 @@ function drupal_get_filename($type, $name, $filename = NULL) { * The path to the requested item or an empty string if the item is not found. */ function drupal_get_path($type, $name) { + if ($type === 'module' || $type === 'profile') { + return dirname(\Drupal::service('module_listing')->getFilenames()[$name]); + } return dirname(drupal_get_filename($type, $name)); }