diff --git a/typo3/sysext/documentation/Classes/Domain/Repository/DocumentRepository.php b/typo3/sysext/documentation/Classes/Domain/Repository/DocumentRepository.php index 057401f4c41636b0c6cad721d1bcba77cf430baa..057064249fdb5370f470b6c24e268f7cd1c72892 100644 --- a/typo3/sysext/documentation/Classes/Domain/Repository/DocumentRepository.php +++ b/typo3/sysext/documentation/Classes/Domain/Repository/DocumentRepository.php @@ -165,7 +165,14 @@ class DocumentRepository { $documentFile = ''; switch ($format) { case 'html': - $documentFile = 'Index.html'; + // Try to find a valid index file + $indexFiles = array('Index.html', 'index.html', 'index.htm'); + foreach ($indexFiles as $indexFile) { + if (file_exists(PATH_site . $formatPath . $format . '/' . $indexFile)) { + $documentFile = $indexFile; + break; + } + } break; case 'pdf': // Retrieve first PDF @@ -175,7 +182,7 @@ class DocumentRepository { } break; } - if (!empty($documentFile) && is_file(PATH_site . $formatPath . $format . '/' . $documentFile)) { + if (!empty($documentFile)) { /** @var \TYPO3\CMS\Documentation\Domain\Model\DocumentFormat $documentFormat */ $documentFormat = $this->objectManager->get('TYPO3\\CMS\\Documentation\\Domain\\Model\\DocumentFormat') ->setFormat($format)