Open totpero opened 9 years ago
Could you please paste the complete log output of this error?
I try to access my web app: http://localhost/app/web/index.php?r=gii/default/view&id=giiant-model and in firebug console i get his error: TypeError: yii.gii is undefined http://localhost/app/web/index.php?r=gii%2Fdefault%2Fview&id=giiant-model Line 486
This is happening because on the footer in the scripts is added this: yii.gii.autocomplete(...
and the javascript with this function is not included.
I'd also recommend to use the CLI generator, see also: https://github.com/schmunk42/yii2-giiant/blob/master/docs/generate-sakila-backend.md
http://localhost/app/web/index.php?r=gii
is accessible ?
if not, maybe Gii is not loaded in your application config.
Gii is only loaded in YII_ENV_DEV
.
if (YII_ENV_DEV) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
'allowedIPs' => $allowedIPs
];
}
Additionally you may update
$allowedIPs = [
'127.0.0.1',
'::1',
'192.168.*',
'172.17.*'
];
But as schmunk42 said, better use the CLI generator.
but why is exist the "Code Generation" button in admin dashboard if is recommended to use CLI generator, if web interface don't works
Good point ;) I wanted to remove that already, but the list is generated automatically by gii.
The project is not stable yet ... the web-interface should work, but it's very likely that there are issues at the moment.
But give the CLI a try, it's a bit of a hurdle in the first place, but it will increase your development speed and reduce your error rate.
i have install phundament last version and if i try to generate model using giiant or model generator from admin i get this error:
TypeError: yii.gii is undefined