Yii Framework Forum: Newbie-> cannot get new controller to work - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Newbie-> cannot get new controller to work Error 404 Rate Topic: -----

#1 User is offline   Ziggi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 95
  • Joined: 14-August 12

Posted 24 August 2012 - 10:32 AM

Hi,

What is going on? - I am lost!

I have even commented-out ullManager section in main configuration file, to be sure this is not routing problem!

OK - the docs say address like this:

index.php?r=entryform

will resolve in the following manner:

CWebApplication->runController('entryform')


so I expect that in case I have a file called "entryformController.php" in '/protected/controllers/' then it should load! But obviously - not - it is not loading at all.

Here you are my 'Error 404' application log:

exception 'CHttpException' with message 'Unable to resolve the request
"entryform".' in /var/yii/web/CWebApplication.php:287
Stack trace:
#0 /var/yii/web/CWebApplication.php(142):
CWebApplication->runController('entryform')
#1 /var/yii/base/CApplication.php(162): CWebApplication->processRequest()
#2 /var/www/mysite/index.php(14): CApplication->run()
#3 {main}
REQUEST_URI=/mysite/index.php?r=entryform
HTTP_REFERER=http://mysite/index.php?r=site/index


So, the simple question is as follows:

WHY ???

What are the all steps necessary to pass user input not through default 'siteController' but through custom one?

Thanks ahead - please help!
0

#2 User is offline   Ziggi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 95
  • Joined: 14-August 12

Posted 24 August 2012 - 10:44 AM

ARGHHHHHHHH !!!!!!

Why there is no single word anywhere that controller file name MUST start from capital letter ???

My controller file must be called 'EntryformController.php' not 'entryformController.php' for Yii to find it !!!

It took me two hours today - alas!!!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users