I’m trying to check an GET-parameter before using the value in fusion. I want to validate if the given node identifier exists and otherwise redirect to the 404 error page.
I guess redirecting to the 404 page in fusion is to late and not possible.
With my PHP background I’m searching for some event/signal or hook. Can somebody point me where to find it?
Edit: Maybe there is a fusion solution for that? I won’t exclude that.
I wrote a Middleware Class but it seems like verifying if a node (provided as a GET param) exist is a little bit to early. I’m facing The security Context cannot be initialized yet. after creating the context with the contextFactory, get the current site node and ask for the given node identifier with the FlowQuery.
So I though of writing my own FlowQueryOperator to use it in fusion but I guess it is not designed to redirect to a 404 page if the element is not given, too.
So I checked the documentation about Routing and Rendering but haven’t found the right place yet.