neos-development-collection icon indicating copy to clipboard operation
neos-development-collection copied to clipboard

FEATURE: "Connect" new site entity to site node

Open mhsdesign opened this issue 1 year ago • 3 comments

The really hacky way to import a neos site is like

  1. ./flow cr:setup
  2. ./flow site:create neosdemo Neos.Demo Neos.Demo:Document.Homepage
  3. ./flow cr:prune
  4. ./flow cr:import resource://Neos.Demo/Private/Content

Originally the neos 9 site:create would create a site entity and a site node, but its actually completely unnecessary to create an event stream just to prune it one second later.

With this change https://github.com/neos/neos-development-collection/pull/4248 ./flow site:create becomes rather a "create only site entity if site node exists already".

Which allows to simplify the above steps to

  1. ./flow cr:setup
  2. ./flow cr:import resource://Neos.Demo/Private/Content
  3. ./flow site:create neosdemo Neos.Demo Neos.Demo:Document.Homepage

Still the site create step is confusing as the $nodeType argument is only used for validation but not used as a sideNode exists already.

The whole site entity <-> site node relation is a bit hard to grasp as one can see by the discussions in https://github.com/neos/neos-development-collection/issues/4470

Also we strive for an export which will include the site entity also (so that its a simple one step like ./flow cr:import resource://Neos.Demo/Private/Content) https://github.com/neos/neos-development-collection/issues/4448

But this issue should discuss how the usecase of having a even-stream dump and how to connect a site entity to it should work. Its not unlikely that passing eventstreams along for debugging will become a habit, so we should make it easy to find out which site nodes exist in graph projection vs which site entities you have.

Maybe we even have to go more manual, if we cant cleanly fix the site entity <-> site node relation and make it all work out of the bod, and add sitenode:create or site:connecttonode or site:showunconnected

mhsdesign avatar Mar 04 '24 19:03 mhsdesign