Skip to content
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

CRUID generator crashes and reveal trace information as shown below #2747

Closed
nowitwiz opened this issue Aug 10, 2013 · 1 comment
Closed

Comments

@nowitwiz
Copy link

This happened when i entered test.test on CRUID generator. by bernard besi@nowitwiz.co.za 2013/08/10 19:05 hours(South Africa)

CException

Alias "test.test" is invalid. Make sure it points to an existing directory or file.

C:\yii\framework\YiiBase.php(341)

329                         unset(self::$_includePaths[$pos]);
330                 }
331 
332                 array_unshift(self::$_includePaths,$path);
333 
334                 if(self::$enableIncludePath && set_include_path('.'.PATH_SEPARATOR.implode(PATH_SEPARATOR,self::$_includePaths))===false)
335                     self::$enableIncludePath=false;
336 
337                 return self::$_imports[$alias]=$path;
338             }
339         }
340         else
341             throw new CException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing directory or file.',
342                 array('{alias}'=>$alias)));
343     }
344 
345     /**
346      * Translates an alias into a file path.
347      * Note, this method does not ensure the existence of the resulting file path.
348      * It only checks if the root alias is valid or not.
349      * @param string $alias alias (e.g. system.web.CController)
350      * @return mixed file path corresponding to the alias, false if the alias is invalid.
351      */
352     public static function getPathOfAlias($alias)
353     {

Stack Trace
#0  
+
 C:\yii\framework\gii\generators\crud\CrudCode.php(59): YiiBase::import("test.test", true)
#1  
+
 C:\yii\framework\validators\CInlineValidator.php(42): CrudCode->validateModel("model", array())
#2  
+
 C:\yii\framework\validators\CValidator.php(213): CInlineValidator->validateAttribute(CrudCode, "model")
#3  
+
 C:\yii\framework\base\CModel.php(159): CValidator->validate(CrudCode, null)
#4  
+
 C:\yii\framework\gii\CCodeGenerator.php(159): CModel->validate()
#5  
+
 C:\yii\framework\gii\CCodeGenerator.php(63): CCodeGenerator->prepare()
#6  
+
 C:\yii\framework\web\actions\CInlineAction.php(49): CCodeGenerator->actionIndex()
#7  
+
 C:\yii\framework\web\CController.php(308): CInlineAction->runWithParams(array("r" => "gii/crud"))
#8  
+
 C:\yii\framework\web\CController.php(286): CController->runAction(CInlineAction)
#9  
+
This happened when i entered test.test.  The version i am using is v1.1.5

 C:\yii\framework\web\CController.php(265): CController->runActionWithFilters(CInlineAction, array())
#10     
+
 C:\yii\framework\web\CWebApplication.php(282): CController->run("")
#11     
+
 C:\yii\framework\web\CWebApplication.php(141): CWebApplication->runController("gii/crud")
#12     
+
 C:\yii\framework\base\CApplication.php(169): CWebApplication->processRequest()
#13     
–
 C:\xampp\htdocs\xampp\user\clients\index.php(13): CApplication->run()

08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();

2013-08-10 19:00:59 Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.16 Yii Framework/1.1.13
@cebe
Copy link
Member

cebe commented Aug 11, 2013

Of course when test.test does not exists it will show you an error, what else did you expect?

@cebe cebe closed this as completed Aug 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants