The Fusion object Vendor.Site:HeaderSlider` cannot be rendered

Hi,

ich habe mir gerade nach diesem Tutorial versucht einen Seiten-Content-Type anzulegen.

Leider bekomme ich folgende Fehlermeldung:

Exception #1332493995 in line 417 of /Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Neos_Fusion_Core_Runtime.php: The Fusion object `TheFreeman.Site:HeaderSlider` cannot be rendered:
					Most likely you mistyped the prototype name or did not define 
					the Fusion prototype with `prototype(TheFreeman.Site:HeaderSlider) < prototype ...` . 
					Other possible reasons are a missing parent-prototype or 
					a missing `@class` annotation for prototypes without parent.
					It is also possible your Fusion file is not read because 
					of a missing `include:` statement.

Ich habe mein NodeTypes.Content.HeaderSlider.yaml angelegt.
grafik

Und eine Fusion und zwei HTML-Dateien.

Ich habe allerdings anstatt, wie im Tutorial angegeben “Carousel” den Bezeichner “HeaderSlider” verwendet.

Aber irgendwo habe ich wohl etwas übersehen.
Nur aus der Meldung werde ich eben nicht schlau.
Wie genau habe ich diese Exception zu interpretieren?

LG

The example is a bit old and relies on a piece of magic that has been removed in the meantime:

try to adjust the first line from:

prototype(Vendor.Site:Content.Carousel) {

to:

prototype(Vendor.Site:Content.Carousel) < prototype(Neos.Neos:Content) {

The missing code was added automatically in previous versions.

Please tell wether this works, so i can adjust the documantation. Cannot see anything else that has to be adjusted.

Regards Martin

Thank you for your quick reply. :slight_smile:
But it didn’t fix the Problem, as it seems.

prototype(TheFreeman.BacherInDe:Content.HeaderSlider) < prototype(Neos.Neos:Content) {
    carouselItems = Neos.Neos:ContentCollection {
        nodePath = 'carouselItems'
        content.iterationName = 'carouselItemsIteration'
        attributes.class = 'carousel-inner'
    }

    // Collect the carousels children but only images
        carouselItemArray = ${q(node).children('carouselItems').children('[instanceof Neos.NodeTypes:Image]')}

    // Enhance image prototype when inside the carousel
        prototype(Neos.NodeTypes:Image) {
        // Render images in the carousel with a special template.
                templatePath = 'resource://TheFreeman.BacherInDe/Private/Templates/FusionObjects/HeaderSlider.html'

        // The first item should later be marked as active
                attributes.class = ${'item' + (carouselItemsIteration.isFirst ? ' active' : '')}

        // We want to use the item iterator in fluid so we have to store it as variable.
                iteration = ${carouselItemsIteration}
    }
}

Please excuse, but I’m a bloody neewbie to NEOS :wink:

Or must I delete somwhere a Cache, or similar, bevore it will take effect? :shushing_face:

Is the the name of your nodetype and the name of the Fusion prototype really identical?

It is possible that you have to define the templatePath also for the protptype(TheFreeman.BacherInDe:Content.HeaderSlider) and not only for ``prototype(Neos.NodeTypes:Image)`

However the approach via Fluid Template is a bit outdated and thus probably a bit bumpy nowadays. In the Neos Demo Package ( https://github.com/neos/Neos.Demo) is a more modern afx based approach for a carousel https://github.com/neos/Neos.Demo/blob/master/Resources/Private/Fusion/Content/Carousel.fusion

There is also is a video about building custom nodetypes: https://docs.neos.io/cms/building-your-first-website/your-first-node-type

Implementing Siders is not the ideal topic to get into neos as those really have their challenges when used for inline editing with the Neos Backend. That is nothing js sliders are usually build for. I recommend to start with simpler contents and try carousels once you get more familiar.

OK,

many many thanks for your assistance.
As I recognized, i have to make smaller steps :slight_smile:

LG