Cannot create language variants - Root Node Aggregate doesn't cover dimension space point

Neos Version: 9.0.3

I’m unable to create English language variants in the Neos backend. When trying to create an English variant of a
page, I get the following error:

Node aggregate “56674390-463b-4b12-b9e3-663f77bc8e09” is classified as root and Root Node Aggregates cannot be varied;
If this error happens, you most likely need to run a node migration “UpdateRootNodeAggregateDimensions” to update the
root node dimensions.

The site was initially created without content dimensions. Later, I added language dimensions to the configuration:

Content Dimensions Configuration:

Neos:
  ContentRepositoryRegistry:
    contentRepositories:
      default:
        contentDimensions:
          language:
            label: 'Sprache'
            icon: 'icon-language'
            defaultValue: 'de'
            values:
              de:
                label: 'Deutsch'
              en:
                label: 'English'

Dimension Resolution Configuration:
Neos:
  Neos:
    sites:
      '*':
        contentDimensions:
          defaultDimensionSpacePoint:
            language: de
          resolver:
            factoryClassName: Neos\Neos\FrontendRouting\DimensionResolution\Resolver\UriPathResolverFactory
            options:
              segments:
                - dimensionIdentifier: 'language'
                  dimensionValueMapping:
                    de: ''
                    en: 'en'

Migrations Executed

I created and executed the following migrations:

Migration 1 (Version20251202000001.yaml):
comments: 'Move all nodes without dimension values to language "de"'
migration:
  -
    transformations:
      -
        type: 'MoveDimensionSpacePoint'
        settings:
          from: { }
          to: { language: 'de' }

Migration 2 (Version20251202000002.yaml):
comments: 'Synchronize root node aggregates with content repository configuration'
migration:
  -
    transformations:
      -
        type: 'UpdateRootNodeAggregateDimensions'
        settings:
          nodeType: 'Neos.Neos:Sites'

Both migrations executed successfully without errors.
The empty creation and the copy creation running both in the same error.

Is there something i missed? Or is it a bug in this version?

Hi @BoxerBuffa ,

this looks good in general. Maybe your workspace is not up-to-date? Have you tried to run:

./flow workspace:rebaseoutdated
./flow flow:cache:flush

If this still doesn’t help you can check the current state in the database:

  1. Check if the new dimension spacepoint it in cr_default_p_graph_dimensionspacepoints

  2. Check in cr_default_p_graph_hierarchyrelation if the dimension spacepoint hash exists for where parentnodeanchor=0 in live workspace and your personal workspace.

Thanks for your help!

Yes i did the ./flow workspace:rebaseoutdated, but in didn`t help.

I will have a look at the database!

Hey Denny,
i checked the Database.

Should the dimensionspacepoint for language en already exist? Or should it be added when i create the new dimension by copying or empty in the backend?

The result as Screenshots.


Hi,

I think in the case of dimension, which have been added after content has already been created you will have to manually migrate the root node dimensions. There is a node migration available, but afaik you have to manually create the yaml file and run the node-migration.

see Node Migration Reference — Neos CMS 9.0.x documentation

This will update the DimensionsSpacePoints for the root node and allow the creation or translation of nodes.

cheers!

Michel

2 Likes

@BoxerBuffa It seems the dimension spacepoints are not present yet.

Maybe you can run this migration you mentioned again. And see if this creates the missing hierachy relations. You must ensure, the configuration is in place, before you run the migration.

Migration 2 (Version20251202000002.yaml):
comments: 'Synchronize root node aggregates with content repository configuration'
migration:
  -
    transformations:
      -
        type: 'UpdateRootNodeAggregateDimensions'
        settings:
          nodeType: 'Neos.Neos:Sites'

If this also doen’t work, you can check the CR status with

./flow cr:status

to see if all events have been applied. If there was an error, newly added events (like the new dimensions) would get processed.

1 Like

Hey, thanks for the answeres! I managed to fix it, thanks to Opus 4.5!

Here is what we did:


  Step 1: Insert the English dimension space point

  INSERT INTO cr_default_p_graph_dimensionspacepoints (hash, dimensionspacepoint)
  VALUES (MD5('{"language":"en"}'), '{"language":"en"}');

  Step 2: Find the highest relation anchor point

  SELECT MAX(relationanchorpoint) as max_anchor FROM cr_default_p_graph_node;

  Note the returned value (e.g., 1000). You'll use max_anchor + 1 in the next step.

  Step 3: Create the root node entry for the English dimension

  Replace 1000 with your max_anchor + 1:

  INSERT INTO cr_default_p_graph_node
  (relationanchorpoint, nodeaggregateid, origindimensionspacepointhash,
   nodetypename, name, properties, classification, created, originalcreated,
   lastmodified, originallastmodified)
  SELECT
    1000 as relationanchorpoint,  -- ← ADJUST THIS!
    nodeaggregateid,
    MD5('{"language":"en"}') as origindimensionspacepointhash,
    nodetypename, name, properties, classification,
    created, originalcreated, lastmodified, originallastmodified
  FROM cr_default_p_graph_node
  WHERE nodeaggregateid = (
    SELECT nodeaggregateid FROM cr_default_p_graph_node
    WHERE nodetypename = 'Neos.Neos:Sites' LIMIT 1
  )
  LIMIT 1;

  Step 4: Get the content stream ID

  SELECT payload FROM cr_default_events
  WHERE type = 'RootWorkspaceWasCreated'
  LIMIT 1;

  Extract the contentStreamId from the JSON payload (e.g., 44d698f9-0a42-4a1f-b1ad-b12b8fc72253).

  Step 5: Create hierarchy relations

  Replace CONTENTSTREAM_ID with the ID from Step 4, and 1001 with your anchor point:

  INSERT INTO cr_default_p_graph_hierarchyrelation
  (position, contentstreamid, dimensionspacepointhash, parentnodeanchor, childnodeanchor, subtreetags)
  VALUES
  (128, 'CONTENTSTREAM_ID', MD5('{"language":"en"}'), 0, 1001, '{}'),     -- ← ADJUST!
  (128, 'CONTENTSTREAM_ID', MD5('{"language":"en"}'), 1001, 2, '{}');     -- ← ADJUST!

  Step 6: Create English variants recursively

  ./flow content:createvariantsrecursively '{"language": "de"}' '{"language": "en"}' --workspace live

  This will copy all German nodes to English.

  Step 7: Clear caches and rebase workspaces

  ./flow flow:cache:flush
  ./flow workspace:rebaseoutdated

  Verification

  Check that nodes exist in both dimensions:

  SELECT
    COUNT(*) as total_nodes,
    d.dimensionspacepoint
  FROM cr_default_p_graph_node n
  JOIN cr_default_p_graph_dimensionspacepoints d
    ON n.origindimensionspacepointhash = d.hash
  GROUP BY d.dimensionspacepoint;

  You should see equal counts for both {"language":"de"} and {"language":"en"}.

This fixed it. But shouldnt the system do it instead of the manuel steps? Feels like a missing feature or a bug.

@BoxerBuffa :warning: You should NEVER change something to the CR tables manually. The content of this tables it the result of the events in the events table. By the concept you can remove these tables and replay all of your events to re-create the state. If you change something on these tables, this can lead to bad issues in the future. As new events might get created based on wrong data.

1 Like

Okay, but what’s the solution to this situation if the documented way isn’t working like expected?

Hi you said youre on Neos

Please update to the latest (i guess 9.0.8) as there have already been a few bugfixes in that regard.

For example TASK: Allow variation of tethered root children by nezaniel · Pull Request #5519 · neos/neos-development-collection · GitHub touched that matter in some way possibly?

Youre lucky we use event sourcing so you can restore your database by using flow cr:setup and replaying all subscriptions via flow subscription:replayAll then lets see if the problem persists.

1 Like

Hard to say without all details. My assumption is, that you maybe missed a step or did them in the wrong order. Let’s step back and try again:

  • Could you please first update to latest 9.0.8?

  • What was the state before you added the EN language?

  • Did you already had the language dimension with “DE”? Or did you add the dimension at all?

  • What do you want to archive? A shine through of DE into EN (fallback)? Or shall EN have only variants of DE which you will create afterwards?

@BoxerBuffa I can reproduce this error. Seems there is a bug we are currently investigating.

Thanks for the information. That would make sense. I did the steps like 5 times in the documented order and the result is always the same.

At the moment, the site is running without any issues with the manual changes. You would recommend not to keep them?

Good news @BoxerBuffa . There is a fix for this issue in progress:

1 Like

Hi there,

the bugfix for this is now included in versions 9.0.10 and 9.1.3 respectively. If you try again after the update, please let us know if this worked.

2 Likes

Looks good so far! Thanks guys!