Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: High level cr:import / Read site:import #4448

Open
mhsdesign opened this issue Aug 5, 2023 · 5 comments
Open

FEATURE: High level cr:import / Read site:import #4448

mhsdesign opened this issue Aug 5, 2023 · 5 comments
Assignees

Comments

@mhsdesign
Copy link
Member

mhsdesign commented Aug 5, 2023

Neos 8 holds the well known site:import command:

COMMAND:
  neos.neos:site:import

USAGE:
  ./flow site:import [<options>]

OPTIONS:
  --package-key        Package key specifying the package containing the sites
                       content
  --filename           relative path and filename to the XML file containing
                       the sites content

but in Neos 9 this is currently removed and the user has to run a few other (counter intuitive steps)

  • (./flow cr:setup)
  • ./flow site:create neosdemo Neos.Demo Neos.Demo:Document.Homepage
  • ./flow cr:prune
  • ./flow cr:import resource://Neos.Demo/Private/Content

imo it would be great to have a high level command like site:import again.
It would imo lookup the Sites.xml in Resources/Private/Content/Sites.xml

<?xml version="1.0" encoding="UTF-8"?>
<root crexport="resource://Neos.Demo/Private/Content">
  <site name="Neos Demo Site" state="1" siteResourcesPackageKey="Neos.Demo" siteNodeName="neosdemo">
  </site>
</root>

When adding the site import, we of course also need the site export again ^^

@crydotsnake crydotsnake changed the title Feature: High level cr:import / Readd site:import FEATURE: High level cr:import / Readd site:import Aug 31, 2023
@crydotsnake crydotsnake changed the title FEATURE: High level cr:import / Readd site:import FEATURE: High level cr:import / Read site:import Aug 31, 2023
@mficzel
Copy link
Member

mficzel commented Aug 31, 2023

Its sounds dangerous to run ./flow cr:prune inside site:import. This would be fine in single site environments but would kill multisite setup that already have sites that should be persisted.

@bwaidelich
Copy link
Member

@mficzel

Its sounds dangerous to run ./flow cr:prune

I agree, the command should not just silently kill all sites, but I didn't expect @mhsdesign to have that in mind.
I would expect the command to be interactive, and allow to prune a single site if needed.

@mhsdesign
Copy link
Member Author

The cr:export should allow neos.neos to specify additional meta data

@mficzel
Copy link
Member

mficzel commented Sep 1, 2023

Suggestion: implement commands like exportAll(string $cr = 'default') and importAll(string $cr = 'default', $file) first. Later commands like export and import for single sites should be reintroduced that should be able to deal with multisite environments.

@ahaeslich
Copy link
Member

Possibly could be moved to 9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

5 participants