-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal Error. Uncaught error: Class 'CI_Controller' not found #6290
Comments
The error causing this must be happening early in your application, before This isn't a bug in CI as far as I can see, so should probably be a Stack Overflow / forum question. |
You and I know, this will never be answered on stack overflow, actually I came here after radio silence in there. This is a really weird bug tbh |
You might have better luck on the CodeIgniter forum if SO isn't helping. The "MY_" classes are override classes (by default) in CI. They will be loaded instead of the "CI_" classes. I still believe your exception is happening before the CI_Controller class is included/required in line 308 above. For debug purposes:
|
But If I remove that line that means I would need to also remove the line that's refreching the csrf token, wouldn't that just make the code unable to keep the token up to date? EDIT: I posted it in the CI forums as well |
I literally mean remove that line and print out the exception that you have to work out what is causing it, rather than trying to do something with |
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
The text was updated successfully, but these errors were encountered: