schmunk42/yii2-giiant

Generator name is empty ... Class c006\utility\migration\Module does not exist

jplozgom opened this issue · 5 comments

Hi everyone. I updated Giiant to version 0.10.2 (I was using a really old version) and when I enter to the webUI to manage models I get the following error.

ReflectionException: Class c006\utility\migration\Module does not exist in /var/www/public/_protected/vendor/schmunk42/yii2-giiant/src/helpers/SaveForm.php:61
Stack trace:
#0 /var/www/public/_protected/vendor/schmunk42/yii2-giiant/src/helpers/SaveForm.php(61): ReflectionClass->__construct('c006\utility\mi...')
#1 /var/www/public/_protected/vendor/schmunk42/yii2-giiant/src/helpers/SaveForm.php(122): schmunk42\giiant\helpers\SaveForm::loadSavedForms('Giiant Model')
#2 /var/www/public/_protected/vendor/schmunk42/yii2-giiant/src/generators/model/form.php(15): schmunk42\giiant\helpers\SaveForm::getSavedFormsJs('Giiant Model')
#3 /var/www/public/_protected/vendor/yiisoft/yii2/base/View.php(348): require('/var/www/public...')
#4 /var/www/public/_protected/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile('/var/www/public...', Array)
#5 /var/www/public/_protected/vendor/yiisoft/yii2-gii/src/views/default/view.php(37): yii\base\View->renderFile('/var/www/public...', Array)
#6 /var/www/public/_protected/vendor/yiisoft/yii2/base/View.php(348): require('/var/www/public...')
#7 /var/www/public/_protected/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile('/var/www/public...', Array)
#8 /var/www/public/_protected/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile('/var/www/public...', Array, Object(yii\gii\controllers\DefaultController))
#9 /var/www/public/_protected/vendor/yiisoft/yii2/base/Controller.php(384): yii\base\View->render('view', Array, Object(yii\gii\controllers\DefaultController))
#10 /var/www/public/_protected/vendor/yiisoft/yii2-gii/src/controllers/DefaultController.php(72): yii\base\Controller->render('view', Array)
#11 [internal function]: yii\gii\controllers\DefaultController->actionView('giiant-model')
#12 /var/www/public/_protected/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#13 /var/www/public/_protected/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#14 /var/www/public/_protected/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction('view', Array)
#15 /var/www/public/_protected/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction('gii/default/vie...', Array)
#16 /var/www/public/_protected/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request))
#17 /var/www/public/backend/index.php(18): yii\base\Application->run()
#18 {main}

This error is caused by an empty name in the generator which is empty. Any Idea how to solve this? Am I missing something in the generator setup in the config file?

thanks

screen shot 2018-08-30 at 12 18 29 pm

This is my config setup.

screen shot 2018-08-30 at 12 20 06 pm

Could you try to (re)move the json files generated by the Web UI.

btw: I'd recommend the CLI anyway.

Sorry for the misunderstanding but which json file do you refer to?

thanks

Problem my be in Yii configuration module section for module "migration". If migration work from command line, migration module can move to console configuration or comment out on generating time.

This PR fix problem: #244

Hi. Thanks both @schmunk42 and @uldisn for your help. @uldisn you were on the right track, I was missing a dependency in my composer (c006/yii2-migration-utility) which I thought I had since I was using giiant last week before I updated it.

Thanks for your help.