Prskavka Posted July 5, 2015 Share Posted July 5, 2015 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 More sharing options...
Prskavka Posted July 5, 2015 Author Share Posted July 5, 2015 Ha! as usuall, I write here, try a thing more and it is working I tried to upload the files one more time, delete class_index in cache and it worked Link to comment Share on other sites More sharing options...
vekia Posted July 5, 2015 Share Posted July 5, 2015 thank you for sharing information where the problem was and how you solved it i marked your answer as a solution to this thread Link to comment Share on other sites More sharing options...
Ornot Posted July 7, 2015 Share Posted July 7, 2015 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 341Fatal 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 More sharing options...
vekia Posted July 7, 2015 Share Posted July 7, 2015 you modified something manually in the COntroller.php file? Link to comment Share on other sites More sharing options...
Ornot Posted July 7, 2015 Share Posted July 7, 2015 No, i have not modified controlled.php manually thanks for your prompt answer ornot Link to comment Share on other sites More sharing options...
vekia Posted July 7, 2015 Share Posted July 7, 2015 what you've got in line 135 in that file? Link to comment Share on other sites More sharing options...
Ornot Posted July 7, 2015 Share Posted July 7, 2015 return new $class_name($auth, $ssl); Link to comment Share on other sites More sharing options...
vekia Posted July 7, 2015 Share Posted July 7, 2015 module trying to load some class that isn't working properly you use some custom classess? Link to comment Share on other sites More sharing options...
Ornot Posted July 8, 2015 Share Posted July 8, 2015 in override/classes/ i have some files .php i don t know if it is that is working not properly? thanks a lot ornot Link to comment Share on other sites More sharing options...
vekia Posted July 8, 2015 Share Posted July 8, 2015 before return new $class_name($auth, $ssl); add var_dump($class_name); die(); and try to reproduce issue, you will see the name of the class that causing problem! 1 Link to comment Share on other sites More sharing options...
Ornot Posted July 8, 2015 Share Posted July 8, 2015 (edited) hi, i have this on the BO login Notice: Undefined index: adminnotfound in /home/xzave/www/fashion/classes/Dispatcher.php on line 341NULL and this on the FO index string(15) "IndexController" thanks, Ornot Edited July 8, 2015 by Ornot (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 8, 2015 Share Posted July 8, 2015 so it's an error with indexController can you please attach the file contents here? 1 Link to comment Share on other sites More sharing options...
Ornot Posted July 13, 2015 Share Posted July 13, 2015 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 More sharing options...
J4c1r4 Posted December 12, 2016 Share Posted December 12, 2016 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 More sharing options...
rocky Posted December 12, 2016 Share Posted December 12, 2016 Does classes/Category.php exist on your server? Link to comment Share on other sites More sharing options...
J4c1r4 Posted December 12, 2016 Share Posted December 12, 2016 (edited) Hello Rocky, I have the, classes / Category.php (The file exists) And this is the problem, the file is correct and in the correct location. And I do not know what to do. Edited December 12, 2016 by J4c1r4 (see edit history) Link to comment Share on other sites More sharing options...
J4c1r4 Posted December 13, 2016 Share Posted December 13, 2016 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 More sharing options...
rocky Posted December 13, 2016 Share Posted December 13, 2016 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 More sharing options...
J4c1r4 Posted December 14, 2016 Share Posted December 14, 2016 (edited) 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 December 14, 2016 by J4c1r4 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now