diff -u b/core/lib/Drupal/Core/Config/FileStorage.php b/core/lib/Drupal/Core/Config/FileStorage.php --- b/core/lib/Drupal/Core/Config/FileStorage.php +++ b/core/lib/Drupal/Core/Config/FileStorage.php @@ -298,18 +298,20 @@ foreach (new \DirectoryIterator($directory) as $fileinfo) { if ($fileinfo->isDir() && !$fileinfo->isDot()) { $collection = $fileinfo->getFilename(); - // Discover if there are sub directories representing a dotted - // collection name. + // Recursively call getAllCollectionNamesHelper() to discover if there + // are subdirectories. Subdirectories represent a dotted collection + // name. $sub_collections = $this->getAllCollectionNamesHelper($directory . '/' . $collection); if (!empty($sub_collections)) { - // Build up the collection name be concatenating the subdirectory + // Build up the collection name by concatenating the subdirectory // names with the current directory name. foreach ($sub_collections as $sub_collection) { $collections[] = $collection . '.' . $sub_collection; } } else { - // + // The directory has no subdirectories. Therefore add each directory + // to list of collections to be returned by the helper. $collections[] = $collection; } }