CodeIgniter
CodeIgniter copied to clipboard
Fatal Error. Uncaught error: Class 'CI_Controller' not found
So this is a kinda old project running CI3 and we're facing this issue. It's very sporadic, it seems like it happens when requesting Ajax routes and the temporary fix testers have found is to "Clear the browser's cache".
From what I can see, people that faced this exact error and reported on StackOverflow have so many different causes too far and between, so I couldn't pinpoint the exact issue.
Of course we don't touch core files, just extend from them in our own controllers, and the fact that it happens at random doesn't help to the issue.
This is a screenshot of what we see in one of the Ajax responses:
This stack trace points to this file called MY_Exceptions.php which has this code, reading another issue report here I kinda thought it was because at this point in the lifecycle CI_Controller wasn't loaded, but this is an Ajax call though, wouldn't the Core components be up even before my code is executed at that point?:
Again, let me emphasize that this doesn't happen all the time with all the existing Ajax requests, nor consistently through all the user machines and browsers, it just happens, a browse cache clear and it's working as intended again.
Can you people help me try to find the cause of this issue? thanks in advance