Skip to content

Commit 9ab0995

Browse files
[MAINTENANCE] Update messages in IndexCommand (kitodo#1799)
Co-authored-by: Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
1 parent af4db06 commit 9ab0995

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Classes/Command/IndexCommand.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
193193
$document->setCurrentDocument($doc);
194194

195195
if ($io->isVerbose()) {
196-
$io->section('Indexing ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . '.');
196+
$io->section('Saving to database ' . $document->getUid() . ' ("' . $document->getLocation() . '") on PID ' . $this->storagePid . '.');
197197
}
198198
$isSaved = $this->saveToDatabase($document, $input->getOption('softCommit'));
199199

@@ -203,7 +203,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
203203
}
204204
$isSaved = Indexer::add($document, $this->documentRepository, $input->getOption('softCommit'));
205205
} else {
206-
$io->error('ERROR: Document with UID "' . $document->getUid() . '" could not be indexed on PID ' . $this->storagePid . '. There are missing mandatory fields (at least one of those: ' . $this->extConf['general']['requiredMetadataFields'] . ') in this document.');
206+
$io->error('ERROR: Document with UID "' . $document->getUid() . '" could not be saved to database on PID ' . $this->storagePid . '. Check TYPO3 log for more details.');
207+
$io->info('POSSIBLE REASONS');
208+
$io->info('The SOLR core "' . $solrCoreUid . '" is not reachable.');
209+
$io->info('The METS document could not be loaded.');
210+
$io->info('There are missing mandatory fields (at least one of those: ' . $this->extConf['general']['requiredMetadataFields'] . ') in this document.');
207211
return Command::FAILURE;
208212
}
209213

0 commit comments

Comments
 (0)