mocdk / moc.notfound Goto Github PK
View Code? Open in Web Editor NEWNeos CMS package that loads a normal editable page for displaying a 404 error
License: MIT License
Neos CMS package that loads a normal editable page for displaying a 404 error
License: MIT License
I realized today, that since Neos 4.3 this package does not longer work (reliably?).
The native 404 handling interacts in some way, so that it was always the homepage being shown. I fixed it by removing moc/notfound
and using this instead:
#
# Extend error matcher to render the document with uriPathSegment `notfound`
# for exceptions with 4xx status code
#
error {
@context.notfoundDocument = ${q(site).children('[instanceof Acme.Com:ErrorPage]').get(0)}
4xx {
@position = 'start'
condition = ${statusCode >= 400 && statusCode < 500 && notfoundDocument}
renderer = Neos.Fusion:Renderer {
@context.node = ${notfoundDocument}
renderPath = '/root'
}
}
}
I admit that this is a real edge case, but I'm asking anyway ๐ :
Is it somehow possible to exclude certain HTTP methods from the 404 status?
The reason why I ask: There is a contactform embedded within my 404 page. When I hit send the POST request comes back with a 404 response.
When empty dimension segments are not supported, the "not found" path that is generated internally is wrong and results in an error:
Uri with path "http://domain.tld/404" could not be found.
In my site package's Configuration/Settings.yaml I added the following lines:
Neos:
Flow:
error:
exceptionHandler:
renderingGroups:
notFoundExceptions:
options:
variables:
path: '404'
But I get the error: Uri with path "http://docker.vm/de/404.html" could not be found.
Seems like the setting cannot be overwritten:
This plugin does not appear to work anymore in Neos 5.X. Could have been caused by the introduction of PSR-7....
I tried to look into this issue myself, but couldn't get it working unfortunately. Any help would be greatly appreciated.
Fatal error: Uncaught exception 'Exception' with message 'Uri with path "http://www.xxx.de//404" could not be found.' in /home/030306-01_xxx.de/Neos-2.0/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/MOC_NotFound_ViewHelpers_RequestViewHelper.php:65 Stack trace: #0 [internal function]: MOC\NotFound\ViewHelpers\RequestViewHelper_Original->render('404') #1 /home/030306-01_xxx.de/Neos-2.0/Packages/Framework/TYPO3.Fluid/Classes/TYPO3/Fluid/Core/ViewHelper/AbstractViewHelper.php(302): call_user_func_array(Array, Array) #2 /home/030306-01_xxx.de/Neos-2.0/Packages/Framework/TYPO3.Fluid/Classes/TYPO3/Fluid/Core/ViewHelper/AbstractViewHelper.php(283): TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper->callRenderMethod() #3 /home/030306-01_xxx.de/Neos-2.0/Data/Temporary/Development/Cache/Code/Fluid_TemplateCache/Standalone_template_file_404_dbdf4a2c4b35c40c443173c497bafff09af1acf5.php(54): TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper->initializeArgumentsAndRender() #4 /home/030306-01_xxx.de/N in /home/030306-01_xxx.de/Neos-2.0/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/MOC_NotFound_ViewHelpers_RequestViewHelper.php on line 65
What i did:
`No controller could be resolved which would match your request.
Package key: "404.html", controller name: "Standard". (GET http://*****.de/test/testsdfs)
Exception Code 1303209195
Exception Type Neos\Flow\Mvc\Controller\Exception\InvalidControllerException`
Using Neos 3.1.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.