CakePHP empty error in error log - cakephp

We have a website that everytime you go to the home page, gets an empty error logged in the error log.
2015-01-26 14:52:27 Error: [NotFoundException] Not Found
Request URL: /
Stack Trace:
#0 /var/www/vhosts/.nl/subdomains//httpdocs/lib/Cake/View/View.php(948): include()
#1 /var/www/vhosts/.nl/subdomains//httpdocs/lib/Cake/View/View.php(910): View->_evaluate('/var/www/vhosts...', Array)
#2 /var/www/vhosts/.nl/subdomains//httpdocs/lib/Cake/View/View.php(471): View->_render('/var/www/vhosts...')
#3 /var/www/vhosts/.nl/subdomains//httpdocs/lib/Cake/Controller/Controller.php(954): View->render('home', NULL)
#4 /var/www/vhosts/.nl/subdomains//httpdocs/app/Controller/PagesController.php(41): Controller->render('home')
#5 [internal function]: PagesController->display('home')
#6 /var/www/vhosts/.nl/subdomains//httpdocs/lib/Cake/Controller/Controller.php(490): ReflectionMethod->invokeArgs(Object(PagesController), Array)
#7 /var/www/vhosts/.nl/subdomains//httpdocs/lib/Cake/Routing/Dispatcher.php(191): Controller->invokeAction(Object(CakeRequest))
#8 /var/www/vhosts/.nl/subdomains//httpdocs/lib/Cake/Routing/Dispatcher.php(165): Dispatcher->_invoke(Object(PagesController), Object(CakeRequest))
#9 /var/www/vhosts/.nl/subdomains//httpdocs/app/webroot/index.php(108): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#10 {main}
I have no idea what causes this error. I tried deleting the whole file so you only see a blank page, but then the error still logs. Can someone point me in the right direction?
EDIT to answer some questions:
We have two layouts. One normal default.ctp and a home.ctp, the home page only has the layout/home.ctp, no pages/home.ctp.

It turns out my project missed the "Views/Pages/home.ctp" file. The website has two Layouts, home.ctp and default.ctp (for the rest of the pages). Because we didn't have anything in "Views/Pages/home.ctp" we deleted the file, but because of that we got the error. When we put back the file (with nothing in it) the error went away.
If you want to read more of the problem, look at the links ndm provided, the solved my question!

Related

Unable to login into Plesk panel

we have the problem that we are unable to login into our Plesk dashboard due to a error message which is shown when we are trying to enter the login page. We are looking for the issue at the moment and a solution to that. Maybe anyone has a suggestions for me what is the reason for this error?
ERROR: Uncaught Zend_Log_Exception: Unable to write to stream in /opt/psa/admin/plib/vendor/plesk/zf1/library/Zend/Log/Writer/Stream.php:135 Stack trace: #0 /opt/psa/admin/plib/vendor/plesk/zf1/library/Zend/Log/Writer/Abstract.php(88): Zend_Log_Writer_Stream->_write(Array) #1 /opt/psa/admin/plib/vendor/plesk/zf1/library/Zend/Log.php(464): Zend_Log_Writer_Abstract->write(Array) #2 /opt/psa/admin/plib/Plesk/Log.php(265): Zend_Log->log('Unable to write...', 3, Array) #3 /opt/psa/admin/plib/Plesk/Log.php(168): Plesk_Log::log('panel', 3, 'Unable to write...') #4 /opt/psa/admin/plib/PleskException.php(26): Plesk_Log::err('Unable to write...') #5 /opt/psa/admin/plib/PleskException.php(13): report_crash('Unable to write...', Array, 'Zend_Log_Except...', 500, Object(Zend_Log_Exception)) #6 [internal function]: plesk_exception_handler(Object(Zend_Log_Exception)) #7 {main} thrown (Stream.php:135)

Cakephp - MissingControllerException Controller class Robots.txt

My error log is loaded with all of the missing errors, for robots.txt, .css files, .png files and more. The site works, but getting errors. How do I get rid of these errors? I feel like I'm missing something simple, maybe a route or something?
2016-05-07 16:11:20 Error: [MissingControllerException] Controller class Robots.txtController could not be found.
#0 /app/webroot/index.php(93): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#1 {main}
2016-05-07 16:32:50 Error: [MissingControllerException] Controller class CssController could not be found.
#0 /app/webroot/index.php(93): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#1 {main}
If you try to fetch a resource that doesnt not exist, cake will try to find a controller by that name. So if you try to access /css/whatever and you have no css folder, cake will try to find a CssController to take you to /:controller/:action

Issue with exporting i18n in cake 2.3

I am trying to do an export of the pot file. Everything is running fine until I get this error:
Class OscProductRelationshipRelation does not exist
#0 /var/www/html/cakephp/cakephp-
2.3/Cake/Console/Command/Task/ExtractTask.php(446): ReflectionClass-
>__construct('OscProductRelat...')
#1 /var/www/html/cakephp/cakephp-
2.3/Cake/Console/Command/Task/ExtractTask.php(281): ExtractTask-
>_extractValidationMessages()
#2 /var/www/html/cakephp/cakephp-
2.3/Cake/Console/Command/Task/ExtractTask.php(232): ExtractTask->_extract()
#3 /var/www/html/cakephp/cakephp-2.3/Cake/Console/Shell.php(388):
ExtractTask->execute()
#4 /var/www/html/cakephp/cakephp-2.3/Cake/Console/Shell.php(385): Shell-
>runCommand('execute', Array)
#5 /var/www/html/cakephp/cakephp-2.3/Cake/Console/ShellDispatcher.php(199):
Shell->runCommand('extract', Array)
#6 /var/www/html/cakephp/cakephp-2.3/Cake/Console/ShellDispatcher.php(67):
ShellDispatcher->dispatch()
#7 /var/www/html/cakephp/cakephp-2.3/Cake/Console/cake.php(43):
ShellDispatcher::run(Array)
I did not find anything online about this error. Does anyone know what to do?

Strange CakePHP message: View file is missing

I am developing a website in CakePHP.
When I go one page back / forward (arrow in your browser) I get the following:
{
"code": 500,
"url": "\urlToWebisite/uploads\/view\/31",
"name": "View file "urlToWebisite\\app\\View\\Uploads\\json\\view.ctp" is missing."
}
The whole page is white and this is the only thing I see...
My error log says:
2014-04-12 22:10:27 Error: [MissingViewException] View file "C:\url\app\View\Users\json\view.ctp" is missing.
Exception Attributes: array (
'file' => 'C:\\url\\app\\View\\Users\\json\\view.ctp',
)
Request URL: /url/users/view/1
Stack Trace:
#0 C:\url\lib\Cake\View\JsonView.php(107): View->_getViewFileName(NULL)
#1 C:\url\lib\Cake\Controller\Controller.php(952): JsonView->render(NULL, NULL)
#2 C:\url\lib\Cake\Routing\Dispatcher.php(192): Controller->render()
#3 C:\url\lib\Cake\Routing\Dispatcher.php(160): Dispatcher->_invoke(Object(UsersController), Object(CakeRequest), Object(CakeResponse))
#4 C:\url\app\webroot\index.php(108): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#5 {main}
Posting my appController won't be necessary: It's only loading models and settings variables for view.
When I reload the page, it loads perfect.
I don't know where to search to the solution. So, please give me some hints!
If I didn't place enough information, please comment ;)
Greetzz
Found the solution... I disabled all .js files and the problem was gone... Now going to find the wrong .js file.
This code:
$( '#bottom-panel .twitter-feed' ).each(function(){
$(this).uouTwitterFeed();
});
Costed me 2 hours :)

cakephp - error when trying to use Cake Console

i'm trying to use Twitter Bootstrap in my Cakephp. Thus i follow the tutorial given here>>https://github.com/slywalker/TwitterBootstrap.
When i try to run the command
Console/cake TwitterBootstrap.copy
this is what turns out:
kostas#ubuntu-laptop:~/Desktop/Projects/mailer/app$ Console/cake TwitterBootstrap.copy
Error: Shell class CopyShell could not be found.
#0 /home/kostas/Desktop/Projects/mailer/lib/Cake/Console/ShellDispatcher.php(190): ShellDispatcher->_getShell('TwitterBootstra...')
#1 /home/kostas/Desktop/Projects/mailer/lib/Cake/Console/ShellDispatcher.php(68): ShellDispatcher->dispatch()
#2 /home/kostas/Desktop/Projects/mailer/app/Console/cake.php(37): ShellDispatcher::run(Array)
#3 {main}
kostas#ubuntu-laptop:~/Desktop/Projects/mailer/app$
Do you know what's happening? :/ I have been trying to bypass this problem for a while without having found any solution yet.
Thank you in advance

Resources