---
title: "Error: No content collection of type TYPO3.Neos:ContentCollection"
url: "https://www.typo3.net/d/118909-error-no-content-collection-of-type-typo3neoscontentcollection"
source: "typo3.net"
tags: ["Neos","Frage"]
created: "2014-09-24"
last_reply: "2014-09-30"
replies: 1
solved: false
page: 1
pages: 1
lang: "de"
---

# Error: No content collection of type TYPO3.Neos:ContentCollection

Neos · 1 Antwort · gestartet 2014-09-24

## Eröffnungsbeitrag

**tobla** · 2014-09-24 · [Beitrag #1](https://www.typo3.net/d/118909-error-no-content-collection-of-type-typo3neoscontentcollection/1)

Hallo Zusammen

Wir sind dabei unsere Seite von Neos 1.0 auf 1.1 upzudaten. Hat soweit auch alles geklappt, nur bei einem selbst definierten NodeType haben wir ein Problem:

```html
Failed to render element
page<TYPO3.Neos:Page>/
body<TYPO3.TypoScript:Template>/
content/
heading<OurVendor.NeosHome:Carousel>/
items/
__meta/
override/
contentCollectionNode
No content collection of type TYPO3.Neos:ContentCollection could be found in the current node (/sites/neoshome/produkte) or at the path "carouselItems". You might want to adjust your node type configuration and create the missing child node through the "flow node:autocreatechildnodes --node-type TYPO3.Neos.NodeTypes:Page" command. (20140924174618600122)
```

Die Page (Produkte ist die aktuell aufgerufene Seite) enthält einen Headerbereich, indem Content Elemente als Elemente eines Carousels ausgegeben werden sollen. Das Carousel der Neos Demo Page scheint leider nicht zu funktionieren, daher unsere eigene Umsetzung.

Sites/OurVendor.NeosHome/Configuration/NodeTypes.yaml:

```yaml
'TYPO3.Neos.NodeTypes:Page':
  childNodes:
    heading:
      type: 'OurVendor.NeosHome:Carousel'
    footer:
      type: 'TYPO3.Neos:ContentCollection'

'OurVendor.NeosHome:Carousel':
  superTypes: ['TYPO3.Neos:Content']
  childNodes:
    carouselItems:
      type: 'TYPO3.Neos:ContentCollection'
  ui:
    label: 'Carousel'
    group: 'plugins'
    icon: 'icon-picture'
    inlineEditable: TRUE
```

Sites/OurVendor.NeosHome/Resources/Private/TypoScript/Library/NodeTypes/Carousel.ts2:

```typoscript
prototype(OurVendor.NeosHome:Carousel) < prototype(TYPO3.Neos:Content) {
        templatePath = 'resource://OurVendor.NeosHome/Private/Templates/TypoScriptObjects/Carousel.html'
        carouselItems = TYPO3.Neos:ContentCollection
        carouselItems {
                nodePath = 'carouselItems'
        }
}
```

Sites/OurVendor.NeosHome/Resources/Private/TypoScript/Library/Root.ts2:

```typoscript
include: NodeTypes/Carousel.ts2
...
namespace: TypoScript=TYPO3.TypoScript

page = Page {
	...
	body {
		...
		content {
			heading = OurVendor.NeosHome:Carousel {
				nodePath = 'heading'
				carouselItems = TYPO3.Neos:ContentCollection {
					nodePath = 'carouselItems'
					collection = ${q(node).children()}
				}
			}
			main = PrimaryContent {
				nodePath = 'main'
			}
		}
		...
	}
}
```

Sites/OurVendor.NeosHome/Resources/Private/Templates/TypoScriptObjects/Carousel.html

```html
{namespace neos=TYPO3\Neos\ViewHelpers}
{namespace ts=TYPO3\TypoScript\ViewHelpers}
<div{attributes -> f:format.raw()}>
	<div class="carousel slide" id="{node.identifier}">
		<!-- Wrapper for slides -->
		<ts:render path="carouselItems" />
		<!-- Controls -->
		<a class="left carousel-control" href="#{node.identifier}" data-slide="prev">
			<span class="icon-prev"></span>
		</a>
		<a class="right carousel-control" href="#{node.identifier}" data-slide="next">
			<span class="icon-next"></span>
		</a>
	</div>
</div>
```

Hat jemand eine Idee, was wir falsch gemacht haben? Wir haben uns an <http://docs.typo3.org/neos/TYPO3NeosDocumentation/IntegratorsCookbook/WrappingListOfContentElements.html> gehalten und auch schon flow node:autocreatechildnodes --node-type TYPO3.Neos.NodeTypes:Page ausgeführt und viele Male den Cache gelöscht. Leider alles ohne Erfolg.

## Antworten

### [#2](https://www.typo3.net/d/118909-error-no-content-collection-of-type-typo3neoscontentcollection/2) · tobla · 2014-09-30

Ich bin dem Fehler auf der Spur, hab ihn aber noch nicht ganz. Wir hatten Syntaxfehler im yaml. Nicht alle Bezeichner waren mit '' gewrappt. Richtig wäre es so:

```yaml
'TYPO3.Neos.NodeTypes:Page':
  childNodes:
    'heading':
      type: 'OurVendor.NeosHome:Carousel'
    'subheading':
      type: 'TYPO3.Neos:ContentCollection'
    'footer':
      type: 'TYPO3.Neos:ContentCollection'
```

jetzt liefert

```actionscript
flow node:autocreatechildnodes --node-type TYPO3.Neos.NodeTypes:Page
```

wenigstens brauchbaren Output.

---

Quelle: „Error: No content collection of type TYPO3.Neos:ContentCollection“, typo3.net, https://www.typo3.net/d/118909-error-no-content-collection-of-type-typo3neoscontentcollection
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
