Crikey error instead of error page

Hey everybody,

I’m having an odd issue and would love some pointers. I have a site with its own custom error page, and I’m sure it has worked already. I did some refining work afterwards, and now I just noticed that the error page isn’t displayed anymore, instead there’s a Crikey error that says:

"Call to a member function getRoute() on null"

in /grav/user/plugins/flex-objects/flex-objects.php > public function onPageNotFound(Event $event)

I did check whether my redirects were interfering, but taking them out didn’t change a thing. Other than that I don’t know what might be the problem?

Your thoughts and ideas are much appreciated!

@Netzhexe, I’ve had a quick look at all the relevant info you have shared, but didn’t find anything suspicious… :wink:

My thoughts exactly! :laughing: However, the problem exists and there must be a cause somewhere. I’ll try to take the site apart in a testing environment and see if anything comes up.

I was just hoping somebody would have a brilliant inspiration right away… :wink:

I’ve looked into this a little more, and the issue might yet be with my .htaccess redirects. I’m not sure – taking them out doesn’t change the Crikey error, but I’ve had quite a few run-ins with cached redirects in the past :neutral_face: – I’m leaving them out on one site for a few days and see if that changes anything.

What seems to make a strong case for the redirects as the culprits is, on localhost everything is fine. I put this in my .htaccess file as the first redirect rule:

RewriteCond %{HTTP_HOST} !=localhost
RewriteCond %{HTTP_HOST} ^domain-name\.de$
RewriteRule ^(.*)$$1 [L,R=301]

Could this affect the retrievability of a custom error page, I’m wondering?