neos / rector

Neos Rector Recipes for code migrations
6 stars 4 forks source link

Provide upgrade guide to `Neos.Neos:Site` #66

Open mhsdesign opened 11 months ago

mhsdesign commented 11 months ago

@kitsunet wrote about neos/neos-development-collection#4563

Makes sense I guess. I am sure though there will be many sites out there that do not have an explicit homepage nodetype right now and need structure adjustments for this. Do we / can we prepare one for this? Or a command ala turnsitenodeintonodetype <your.node:type> ? Could probably also happen during converting from old to new.

Currently the legacy migration would fail in attempt to migrate such site directly:

The site node "site-node-id" (type: "Some.Package:SomeNodeType") must be of type "Neos.Neos:Site"

In this issue i want to document our further discussions.

Anke and Bernhard agreed with me that in order to upgrade your Neos 8 page needs to have a distinct nodetype for the homepage. This is a fair assumption to make as this is currently good practice. With neos 9 we will enforce this behavior.

For projects without a distinct site nodeType we want to document the steps one has to take to achieve this:

  1. Create a new Vendor.Site:MyHomePage and extend your previous page nodetype.
  2. Create fusion rendering for the homepage by extending the page rendering.
  3. Use an automated migration for all your sites, or manually change the type of the site node.

After completing these steps, you can upgrade the codebase to Neos 9 and add the Neos.Neos:Site as supertype to your homepage node before running the escr legacy importer.

Vendor.Site:MyHomePage:
  superTypes:
    Neos.Neos:Site: true
mhsdesign commented 11 months ago

For current 9.0 projects without a homepage the same steps have to be applied. Otherwise this error will appear:

image

After updating to the latest neos dev commit you can add

Vendor.Site:MyHomePage:
  superTypes:
    Neos.Neos:Site: true

to your DEDICATED homepage like we did in the neos demo: https://github.com/neos/Neos.Demo/pull/182