Merge pull request #927 from sebastian-meyer/fix-solr-core-creation
[BUG] Make Solr core name mandatory
This commit is contained in:
commit
b224141d5d
|
@ -280,11 +280,13 @@ class NewTenantController extends AbstractController
|
|||
$newRecord = GeneralUtility::makeInstance(SolrCore::class);
|
||||
$newRecord->setLabel($this->getLLL('flexform.solrcore', $this->siteLanguages[0]->getTypo3Language(), $beLabels). ' (PID ' . $this->pid . ')');
|
||||
$indexName = Solr::createCore('');
|
||||
$newRecord->setIndexName($indexName);
|
||||
if (!empty($indexName)) {
|
||||
$newRecord->setIndexName($indexName);
|
||||
|
||||
$this->solrCoreRepository->add($newRecord);
|
||||
$this->solrCoreRepository->add($newRecord);
|
||||
|
||||
$doPersist = true;
|
||||
$doPersist = true;
|
||||
}
|
||||
}
|
||||
|
||||
// We must persist here, if we changed anything.
|
||||
|
|
|
@ -118,6 +118,8 @@ class DataHandler implements LoggerAwareInterface
|
|||
$fieldArray['index_name'] = Solr::createCore($fieldArray['index_name']);
|
||||
if (empty($fieldArray['index_name'])) {
|
||||
$this->logger->error('Could not create new Apache Solr core');
|
||||
// Unset all fields to prevent new database record if Solr core creation failed.
|
||||
unset($fieldArray);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ return [
|
|||
'max' => 255,
|
||||
'eval' => 'alphanum,nospace,unique',
|
||||
'default' => '',
|
||||
'readOnly' => 1,
|
||||
'fieldInformation' => [
|
||||
'solrCoreStatus' => [
|
||||
'renderType' => 'solrCoreStatus',
|
||||
|
|
Loading…
Reference in New Issue