Sometimes lose the complete ContentCollector

I’ve been having this problem for a while. That my content disappears in ContentCollector and an error message appears in its place.

When I execute ./flow node:repair, the message

Found orphan node named "main" (Neos.Neos:ContentCollection) in "/sites/site/node-v9qqrl5yhbypy/node-sbbctcdqjkhlx/node-ixhusmyusb5al/main"
`Found orphan node named "sidebar" (Neos.Neos:ContentCollection) in "/sites/site/node-v9qqrl5yhbypy/node-sbbctcdqjkhlx/node-ixhusmyusb5al/sidebar"

If I deny this, come later:

❱ Add node c0405e12-c7a7-88ac-8230-04e7da9c6302 named "main" in "/sites/site/node-> v9qqrl5yhbypy/node-sbbctcdqjkhlx/node-qbpf0o0c1zyz2"
    applied ✔
Created 1 new child nodes
An exception occurred while executing 'INSERT INTO neos_contentrepository_domain_model_nodedata (persistence_object_identifier, pathhash, path, parentpathhash, parentpath, identifier, sortingindex, removed, dimensionshash, lastmodificationdatetime, lastpublicationdatetime, hiddenbeforedatetime, hiddenafterdatetime, dimensionvalues, properties, nodetype, creationdatetime, hidden, hiddeninindex, accessroles, workspace, contentobjectproxy, movedto) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["d1517218-0673-4bc6-b4b3-9ef62a540963", "1497732105f63b4d5105c322bc0450b3", "\/sites\/site\/node-v9qqrl5yhbypy\/node-sbbctcdqjkhlx\/node-qbpf0o0c1zyz2\/main", "3cef46ef50d6b91da7cd7638fb654f63", "\/sites\/site\/node-v9qqrl5yhbypy\/node-sbbctcdqjkhlx\/node-qbpf0o0c1zyz2", "c0405e12-c7a7-88ac-8230-04e7da9c6302", 300, 0, "fb11fdde869d0a8fcfe00a2fd35c031d", "2020-02-28 10:09:18", null, null, null, "{\n    \"language\": {\n        \"0\": \"de\"\n    }\n}", "{}", "Neos.Neos:ContentCollection", "2020-02-28 10:09:18", 0, 0, "{}", "live", null, null]:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
'1497732105f63b4d5105c322bc0450b3-live-fb11fdde869d0a8fcfe00a2fd3' for
key 'UNIQ_CE6515692DBEC7578D94001992F8FB01'

  Type: Doctrine\DBAL\Exception\UniqueConstraintViolationException
  File: Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriv
        er.php
  Line: 55

Nested exception:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1497732105f63b4d5105c322bc0450b3-live-fb11fdde869d0a8fcfe00a2fd3' for key 'UNIQ_CE6515692DBEC7578D94001992F8FB01'

  Type: Doctrine\DBAL\Driver\PDOException
  Code: 23000
  File: Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php
  Line: 123

Nested exception:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1497732105f63b4d5105c322bc0450b3-live-fb11fdde869d0a8fcfe00a2fd3' for key 'UNIQ_CE6515692DBEC7578D94001992F8FB01'

  Type: PDOException
  Code: 23000
  File: Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php
  Line: 121

How can it be that if there is a change in the aftermath, the whole block is gone? I’ve got nothing in the logs either, except:

Exception #1389352984: No content collection of type Neos.Neos:ContentCollection could be found in the current node (/sites/site/node-v9qqrl5yhbypy/node-sbbctcdqjkhlx/node-qbpf0o0c1zyz2) or at the path "main". You might want to adjust your node type configuration and create the missing child node through the "flow node:repair --node-type Foo.Bar:Article" command.

How does your yaml config for the page with the issue look?

'Foo.Bar:News':
    superTypes:
        'Neos.Neos:Document': true
    constraints:
        nodeTypes:
            '*': false
            'Neos.Neos:Document': false
            'Foo.Bar:News': true
    options:
        fusion:
            prototypeGenerator: ~
    childNodes:
        main:
            type: 'Neos.Neos:ContentCollection'
        sidebar:
            type: 'Neos.Neos:ContentCollection'
    ui:
        label: 'Artikel'
        icon: 'icon-newspaper'
        group: 'news'
        inspector:
            groups:
                headerImage:
                    label: 'Titelbild'
                news:
                    label: 'News'
    properties:
        'titleOverride':
            type: string
            ui:
                label: 'Seo-Titel'
                reloadIfChanged: true
                position: 1
                inspector:
                    group: 'seometa'
                    editor: 'Neos.Neos/Inspector/Editors/TextAreaEditor'
        'title':
            type: string
            ui:
                label: 'Navigationsname'
                reloadIfChanged: true
                inspector:
                    group: 'document'

        'h1':
            type: string
            ui:
                label: 'H1'
                reloadIfChanged: true
                inspector:
                    group: 'document'

        'subTitle':
            type: string
            ui:
                label: 'Dachzeile'
                reloadIfChanged: true
                inspector:
                    group: 'document'
        'headerImage':
            type: 'Neos\Media\Domain\Model\ImageInterface'
            ui:
                label: 'Titelbild'
                reloadIfChanged: TRUE
                inspector:
                    group: 'headerImage'
        alternativeText:
            type: string
            ui:
                label: 'Alternativ Text'
                reloadIfChanged: true
                inspector:
                    group: 'headerImage'
            validation:
                'Neos.Neos/Validation/StringLengthValidator':
                    minimum: 0
                    maximum: 255

        'teaserText':
            type: string
            ui:
                label: 'Teaser'
                reloadIfChanged: TRUE
                inspector:
                    group: 'news'
                    editor: 'Neos.Neos/Inspector/Editors/TextAreaEditor'
        'isAuthorBeUser':
            type: boolean
            ui:
                label: 'Author is backend user'
                reloadIfChanged: true
                inspector:
                    group: 'news'
        'isTopNews':
            type: boolean
            ui:
                label: 'Topnews'
                inspector:
                    group: 'news'
        'onHomepage':
            type: boolean
            ui:
                label: 'Startseite'
                inspector:
                    group: 'news'
        'authorName':
            type: string
            ui:
                label: 'Author name'
                reloadIfChanged: true
                inspector:
                    group: 'news'
            validation:
                'Neos.Neos/Validation/NotEmptyValidator': []
                'Neos.Neos/Validation/StringLengthValidator':
                    minimum: 1
                    maximum: 255
        'dateTime':
            type: DateTime
            ui:
                label: 'Date'
                reloadIfChanged: true
                inspector:
                    group: 'news'
            validation:
                'Neos.Neos/Validation/NotEmptyValidator': []
                'Neos.Neos/Validation/DateTimeValidator': []
        'hideDate':
            type: boolean
            ui:
                label: 'Datum nicht ausgeben'
                inspector:
                    group: 'news'
        'relatedNews':
            type: references
            ui:
                label: 'Related news'
                reloadIfChanged: true
                inspector:
                    group: 'news'
                    editorOptions:
                        nodeTypes: ['Foo.Bar:News']
        'tags':
            type: string
            ui:
                label: 'Tags'
                reloadIfChanged: true
                inspector:
                    group: 'news'
            search:
                elasticSearchMapping:
                    type: string
                    index: not_analyzed
                    include_in_all: false
                indexing: ${String.split(value, ',')}
        'categories':
            type: references
            ui:
                label: 'Categories'
                reloadIfChanged: true
                inspector:
                    group: 'news'
                    editorOptions:
                        nodeTypes: ['Foo.Bar:Category']

And you don’t override the type somewhere else?

yes

Any special dimensionconfig?

no, and it’s not always, but rather once in a while