[HALF SOLVED] Issues with prototypes inheritance

Hi all,
I’m encountering 2 (I hope) sperated issues with Neos prototype inheritance.

  1. Following the first 2 examples on the page http://neos.readthedocs.io/en/stable/HowTos/SelectingPageTemplate.html I created:

    prototype(My.Package:Page) < prototype(Neos.Neos:Page){
    all the common options
    prototype(My.Package:Page2) < prototype(My.Package:Page){

The problem si that when I create a page with this last prototype, in the DOM appears a string with the properties of the page, like:

<body class="bodyContent coverPage" id="Page-node-57bf0374c9ca1">


The problem seems only resolved if I transform the prototype declaration in:

prototype(My.Package:Page2) >
prototype(My.Package:Page2) < prototype(My.Package:Page){

but I found no documentation on this, anyone can point me in the right direction?

  1. Can anyone tell me why the following snippet is completely ignored?

    body.javascripts.[key] = Neos.Fusion:Tag{
    tagName = 'script’
    src = Neos.Fusion:ResourceUri {
    path = ‘resource://My.Package/Public/Js/FlameViewportScale.js’

Obviously the file exists and is publicly reachable (the resource is correct), I cleared any kind cache I could think of but it is never added.
i took inspiration from: https://github.com/daniellienert/DL.Gallery/blob/master/Resources/Private/Fusion/Themes/BootstrapLightbox.fusion

A side note I posted the two issues together as I’m facing them in the same project at the same time and I’d like to avoid any connection.


Hi guys,
as for the second iusse I posted I found out it is a package-loading issue.
If I move my package from Application to Plugins folder the snippet start working as expected, indeed.

Is there a way to have a predicable loading order so far? (Just personal curiosity).


Hey Nicola,

regarding your first issue: prototype(My.Package:Page2) > clears the page prototype which may have been autogenerated by Neos if you have a Node Type of the same name. So if the markup you don’t want disappears after that, it’s probably because Neos passes through a certain set of values from the node by default. @sebastian has done a nice job explaining this in a screencast. See here: http://www.youtube.com/watch?v=wpjEIP41048&t=43m26s

Regarding issue number 2 - package loading order is defined via the composer.json of your packages. If you depend on a certain package which needs to be loaded first (e.g. because you want to override settings or routes from it), simply add a corresponding “require” statement to your package’s composer.json. Make sure to run ./flow package:rescan or rm Configuration/PackageStates.php afterwards because Flow caches these settings.

1 Like

Thanks @beheist, great news… I’ll work on that.