Skip to content

Commit

Permalink
[BUGFIX] Fix message for missing fields (#1385)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
  • Loading branch information
beatrycze-volk and sebastian-meyer authored Dec 16, 2024
1 parent 0b53feb commit 0a306c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Command/IndexCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}
$isSaved = Indexer::add($document, $this->documentRepository, $input->getOption('softCommit'));
} else {
$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.');
$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.');
return BaseCommand::FAILURE;
}

Expand All @@ -211,7 +211,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return BaseCommand::SUCCESS;
}

$io->error('ERROR: Document with UID "' . $document->getUid() . '" could not be indexed on Solr core ' . $solrCoreUid . ' . There are missing mandatory fields (at least one of those: ' . $this->extConf['general']['requiredMetadataFields'] . ') in this document.');
$io->error('ERROR: Document with UID "' . $document->getUid() . '" could not be indexed on Solr core ' . $solrCoreUid . '. There are missing mandatory fields (at least one of those: ' . $this->extConf['general']['requiredMetadataFields'] . ') in this document.');
$io->info('INFO: Document with UID "' . $document->getUid() . '" is already in database. If you want to keep the database and index consistent you need to remove it.');
return BaseCommand::FAILURE;
}
Expand Down

0 comments on commit 0a306c1

Please sign in to comment.