neos-development-collection
neos-development-collection copied to clipboard
Fusion prototype inheritance not working
Description
This is the weirdest thing I've stumbled upon. A perfect case of "works on my machine":
Left is local in Docker, right is on my Dev-Server. The have the same MariaDB version, the exakt same PHP version, same files etc.
Both run in FLOW_CONTEXT=Development
.
Trust me, they are identical.
What is happening here, that on the Dev-Server it outputs:
<!DOCTYPE html><html lang="en-US">
<head><meta charset="UTF-8" />
<title>Outdoor Fitness Training am Galgenberg Regensburg - everfits</title></head><body class><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/TYPO3Fluid/Fluid/ViewHelpers">
<head>
<title>NodeType Location</title>
</head>
<body>
</body>
</html>
Which lead me to the indication that the prototype inheritance of Fusion is not working at that point.
This is my fusion code (the important parts):
prototype(Jhoechtl.Everfits:Standard) < prototype(Neos.Neos:Page) {
body {
node = ${node}
templatePath = 'resource://Jhoechtl.Everfits/Private/Templates/Page/Default.html'
sectionName = 'body'
content.test = 'TEST'
}
}
...
prototype(Jhoechtl.Everfits:Location) < prototype(Jhoechtl.Everfits:Standard) {
body {
templatePath = 'resource://Jhoechtl.Everfits/Private/Templates/Page/Location.html'
content.foo = 'FOO'
}
}
I've traced down, that the path <Jhoechtl.Everfits:Standard>/body
is not correctly inherited. When it outputs the page Jhoechtl.Everfits:Location
the sectionName
and content.test
is missing.
Funny thing, the prototype(Jhoechtl.Everfits:Frontpage) < prototype(Jhoechtl.Everfits:Standard)
works and inherits the stuff.
It also works on my machine, but I have no idea why it doesn't on the dev server.
Expected behavior
The inheritance should work at this point and display the same page as locally in Docker.
Affected Versions
Neos: > 5.3, < 7.2
When I have situations like these, it's most of the time a different package loading order. I would compare the output of ./flow package:list --loading-order
on both systems.
Mabye your package need to require neos/neos oder neos/nodetypes (or something else) to make sure they are loaded before?
@DrillSergeant
Local (everything of significance):
Neos.Fusion 7.1.0
Neos.Fusion.Afx 7.1.0
Neos.Fusion.Form 2.0.3
Neos.Neos 7.1.0
Neos.Neos.Ui 7.1.1
Neos.Seo 3.2.0
Neos.Form 5.2.2
Neos.RedirectHandler 5.0.0
Sitegeist.Kaleidoscope 6.1.0
Neos.NodeTypes.BaseMixins 7.1.0
Neos.NodeTypes.AssetList 7.1.0
Neos.NodeTypes.ColumnLayouts 7.1.0
Neos.NodeTypes.ContentReferences 7.1.0
Neos.NodeTypes.Html 7.1.0
Neos.NodeTypes.Navigation 7.1.0
Neos.NodeTypes.Form 7.1.0
Neos.NodeTypes 7.1.0
Neos.SwiftMailer 7.2.0
Neos.RedirectHandler.NeosAdapter 4.3.0
Flowpack.Listable 3.5.0
Flowpack.CacheBuster 1.1.0
Neos.RedirectHandler.DatabaseStorage 5.0.0
Neos.RedirectHandler.Ui 2.4.3
Flowpack.NodeTemplates 1.3.1
PackageFactory.AtomicFusion.ClassNames 1.0.1
Jhoechtl.Everfits 1.0.0
Dev:
Neos.Eel 7.1.2
Neos.Flow 7.1.2
Neos.FluidAdaptor 7.1.2
Neos.Fusion 7.1.0
Neos.Fusion.Afx 7.1.0
Neos.Fusion.Form 2.0.3
Neos.Neos 7.1.0
Neos.Neos.Ui 7.1.1
Neos.Seo 3.2.0
Neos.SwiftMailer 7.2.0
Neos.NodeTypes.BaseMixins 7.1.0
Neos.NodeTypes.ColumnLayouts 7.1.0
Flowpack.CacheBuster 1.1.0
Neos.Form 5.2.2
Neos.NodeTypes.Form 7.1.0
Neos.RedirectHandler.NeosAdapter 4.3.0
Neos.NodeTypes.Html 7.1.0
Sitegeist.Kaleidoscope 6.1.0
Neos.NodeTypes.ContentReferences 7.1.0
Neos.RedirectHandler.DatabaseStorage 5.0.0
Neos.NodeTypes.AssetList 7.1.0
Flowpack.Listable 3.5.0
Flowpack.NodeTemplates 1.3.1
Neos.NodeTypes.Navigation 7.1.0
Neos.NodeTypes 7.1.0
PackageFactory.AtomicFusion.ClassNames 1.0.1
Jhoechtl.Everfits 1.0.0
Ok, seems not to be the source of error in your case. Nevermind, was just a shot in the dark.
Hi ;) Sorry for the late response i looked at this issue now a few times but couldnt make sense of it. Did you found the problem or found any new clues?
Oh wait there rings a bell, i had a similar problem, where there was at some place an exception which was just absorbed and the fusion runtime decided not to render everything ... so there definitely is something to fix