Jump to content

Fatal error: Class 'IndexController' not found in classes/controller/Controller.php on line 135


Recommended Posts

Hi all,

 

my shop is working for a while now, but today I have got a blank page (error 500). After turning on errors, I've got this message

 

Fatal error: Class 'IndexController' not found in /nfsmnt/hosting2_2/d/6/d67f1945-0fe9-4615-9ed0-747478dcf54c/handmadealandizi.sk/web/classes/controller/Controller.php on line 135

 

My prestashop version is 1.6.11. I uploaded new Controller.php from fresh presta 1.6.11, deleted class_index in cache but still no luck.

 

I did not tuch anything in the shop before this error occured, so I was surprised, this came up.

 

Have you any idea, what to try next, so my shop is alive again?

 

Thank you!

Link to comment
Share on other sites

hello,

 

i dont have problem with fo but on the bo of presta 1.6.0.9

i have a white page with this error:

 

Notice: Undefined index: adminnotfound in /home/xzave/www/fashion/classes/Dispatcher.php on line 341

Fatal error: Class name must be a valid object or a string in /home/xzave/www/fashion/classes/controller/Controller.php on line 135

 

 

i have delete the index_class in the cache

 

i replace many copy of controller.php of presta 1.6.0.9; 1.6.0.8;1.6.0.10 without success; after each copy i delete the index class

 

thank you for your response,

 

Ornot

Link to comment
Share on other sites

Hello, vekia,

 

2 days ago, i have another idea:

 

OVH, my web hosting, made for me somes snapshot (backup) of my ftp, i see that i have a snapshot from 14 days ago (backup J-14).

 

and i download all, except ../img/

 

after that i test the website without images ; and the site works on FO and BO!!!!

 

then i move ../img on the new folder

 

Why i did do that?

 

i see that there are somes folders and files that are missing;

 

i thanks a lot

 

regards,

 

Ornot :) :) :)

Link to comment
Share on other sites

  • 1 year later...
Hello,

 

I have the same error.

 

Fatal error: Class 'category' not found in /home/komplett/www/classes/controller/Controller.php on line 134

 

And I already applied the solutions found by other people, and I could not solve.

Does anyone have a different idea?

 

Thanks.

 

(P.s; I do not speak English perfectly, sorry for some mistake)

Link to comment
Share on other sites

Does classes/Category.php exist on your server?

 
Hello Rocky,
 
I have the, classes / Category.php (The file exists, And is not empty)
 
And this is the problem, the file is correct and in the correct location. And I do not know what to do.
I deleted the file "category.php" from its Classes folder, and the error is the same.
I've copied the "category.php" file, into the Classes folder, and the error remains the same.
 
The code does not find the Category.php file, I do not know how to solve it.
 
I need help.
Link to comment
Share on other sites

Assuming you're using PrestaShop v1.6.1.10 like me, it is the getController function on line 134. Why is it trying to load a controller called "Category"? It should be trying to load "CategoryController". Maybe you have an override that's been written incorrectly? It's hard to know without access to your website or some more debugging information. You can add code like the following before the return line to do this:
if (strtolower($class_name) == 'category') var_dump(debug_backtrace());

Also, did you try deleting cache/class_index.php like suggested above to make sure there's no error in it?

Link to comment
Share on other sites

 

Assuming you're using PrestaShop v1.6.1.10 like me, it is the getController function on line 134. Why is it trying to load a controller called "Category"? It should be trying to load "CategoryController". Maybe you have an override that's been written incorrectly? It's hard to know without access to your website or some more debugging information. You can add code like the following before the return line to do this:
if (strtolower($class_name) == 'category') var_dump(debug_backtrace());

Also, did you try deleting cache/class_index.php like suggested above to make sure there's no error in it?

 

 

 

 

Hello, I solved the problem in another way.
 
Like you said, something in the code had been spelled wrong.
I've located a file called category.php (in lowercase), as sayed the error message. The file was in another folder and this was generating a conflict.
 
It was a non-native module file, and I had deleted this module.
 
The wrong file was in the folder:
\ Controllers \ front \ category.php
 
I deleted the file. And after that the site returned to work perfectly.
 
Thks
Edited by J4c1r4 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...