Skip to content

Commit 76e6a05

Browse files
committed
TASK: Adjust to use site:importall
Fixes: #14 see neos/neos-development-collection#5307
1 parent fcb1fe0 commit 76e6a05

File tree

2 files changed

+11
-19
lines changed

2 files changed

+11
-19
lines changed

Classes/Infrastructure/Healthcheck/SiteHealthcheck.php

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,19 @@ public function execute(HealthcheckEnvironment $environment): Health
4343
}
4444

4545
if (!$environment->isSafeToLeakTechnicalDetails()) {
46-
// TODO adjust to 9.0
47-
return new Health('No Neos site was created. Please visit the documentation how setup a site.', Status::WARNING());
46+
return new Health('No Neos site was created. Please look into <code>{{flowCommand}} site:importall</code> or <code>{{flowCommand}} site:create</code>.', Status::WARNING());
4847
}
4948

5049
$availableSitePackagesToBeImported = [];
5150
foreach ($this->packageManager->getFilteredPackages('available', 'neos-site') as $sitePackage) {
52-
$possibleSiteContentToImport = sprintf('resource://%s/Private/Content/events.jsonl', $sitePackage->getPackageKey());
51+
$possibleSiteContentToImport = sprintf('resource://%s/Private/Content', $sitePackage->getPackageKey());
5352
if (file_exists($possibleSiteContentToImport)) {
5453
$availableSitePackagesToBeImported[] = $sitePackage->getPackageKey();
5554
}
5655
}
5756

5857
if (count($availableSitePackagesToBeImported) === 0) {
5958
if (!$this->packageManager->isPackageAvailable('Neos.SiteKickstarter')) {
60-
// TODO adjust to 9.0
6159
return new Health(<<<MSG
6260
No Neos site was created. You might want to install the site kickstarter: <code>composer require neos/site-kickstarter</code>.
6361
Or you can create a new site package completely from scratch via <code>{{flowCommand}} package:create My.Site --package-type=neos-site</code>.
@@ -66,24 +64,17 @@ public function execute(HealthcheckEnvironment $environment): Health
6664
MSG, Status::WARNING());
6765
}
6866

69-
// TODO adjust to 9.0
7067
return new Health(<<<MSG
71-
No Neos site was created. You can kickstart a new site package via <code>{{flowCommand}} kickstart:site My.Site my-site</code>
72-
and import it via <code>{{flowCommand}} site:import --package-key My.Site</code>
68+
No Neos site was created. You can kickstart a new site package via <code>{{flowCommand}} kickstart:site My.Site</code>
69+
and use it to create a site via <code>{{flowCommand}} site:create my-site My.Site My.Site:Document.Homepage</code>
7370
MSG, Status::WARNING());
7471
}
7572

76-
if (count($availableSitePackagesToBeImported) === 1 && $availableSitePackagesToBeImported[0] === 'Neos.Demo') {
77-
// TODO adjust to 9.0 (make less specific to neos demo)
78-
return new Health(<<<MSG
79-
No Neos site was created. To import the site from Neos.Demo you can run <code>{{flowCommand}} site:create neosdemo Neos.Demo Neos.Demo:Document.Homepage</code> and <code>{{flowCommand}} cr:prune</code> and <code>{{flowCommand}} cr:import resource://Neos.Demo/Private/Content</code>
80-
MSG, Status::WARNING());
81-
}
82-
83-
// TODO adjust to 9.0
84-
$availableSitePackages = join(', ', $availableSitePackagesToBeImported);
85-
return new Health(<<<MSG
86-
No Neos site was created. To import from one of the available site packages ($availableSitePackages) follow the steps from the documentation.
87-
MSG, Status::WARNING());
73+
$firstAvailableSitePackageKey = array_shift($availableSitePackagesToBeImported);
74+
return new Health(sprintf(
75+
'No Neos site was created. To import the site from %1$s you can run <code>{{flowCommand}} site:importall --package-key %1$s</code>.%2$s',
76+
$firstAvailableSitePackageKey,
77+
$availableSitePackagesToBeImported === [] ? '' : sprintf(' Or import one of the other available site packages: %s', join(', ', $availableSitePackagesToBeImported))
78+
), Status::WARNING());
8879
}
8980
}

Classes/Infrastructure/ImageHandler/ImageHandlerService.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class ImageHandlerService
4949
public function __construct()
5050
{
5151
//
52+
// FIXME: It seems there is this hack and in the image factory there is a hack too now (: https://github.com/neos/imagine/pull/11
5253
// Hack. We instantiate the unproxied class without injected settings.
5354
// This is to allow to still reconfigure the image driver, even if it is disabled.
5455
// The "driver" Gd for Imagine must be enabled by settings, check Neos.Imagine.enabledDrivers. Or use ./flow setup:imagehandler

0 commit comments

Comments
 (0)