while testing a demo package in Neos 8.2 I have a redirect issue to “404 - Not Found” Page when I call a page that didn’t exist.
Here is the error message:
No Fusion object found in path "error"
Please make sure to define one in your Fusion configuration.
Exception Code 1332493990
Exception Type Neos\Fusion\Exception\MissingFusionObjectException
Log Reference 20221226010021a7ecac
Thrown in File Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Neos_Fusion_Core_Runtime.php
Line 889
Original File Packages/Application/Neos.Fusion/Classes/Core/Runtime.php
I checked the existence of the file /Packages/Sites/Neos.Demo/Resources/Private/Fusion/Override/Error.fusion - it is present:
##
# Error matcher to render the 'notfound' child-document of the homepage
# for exceptions with 4xx status code
#
error {
@context.notfoundDocument = ${q(site).children('notfound').get(0)}
4xx {
@position = 'start'
condition = ${statusCode >= 400 && statusCode < 500 && notfoundDocument}
renderer = Neos.Fusion:Renderer {
@context.documentNode = ${notfoundDocument}
@context.node = ${notfoundDocument}
renderPath = '/root'
}
}
}
Has anyone had the same error message?
Thanks a lot.
Other than that I would try to debug why error has no object assigned and if a certain file is not loaded… (but that’s certainly advanced, maybe someone else has a better solution)
thanks for your tip, it helped me. As a test I tried to include the error matcher from “Packages/Application/Neos.Neos/Resources/Private/Fusion/Error/Root.fusion” to “Packages/Application/Neos.Neos/Resources/Private/Fusion/Root.fusion”:
include: Error/Root.fusion
and it worked.
I compared the Fusion binding “Neos.Neos” (8.2 vs. 7.3) and found that the error matcher in 7.3 was contained in the “Packages/Application/Neos.Neos/Resources/Private/Fusion/DefaultFusion.fusion”. DefaultFusion.fusion itself was included in “Packages/Application/Neos.Neos/Resources/Private/Fusion/Root.fusion”. If I’m not mistaken, in 8.2 seems to have inactive error handling (404) by default.