Gii Error

Well,I tried to create a model class using Gii.But Model generator is not working.All other CRUD generators are working perfectly.Well the errors it is showing is related to Sendgrid,A module I installed to send Emails.

The errors are

1.E_WARNING: Missing argument 1 for SendGrid::__construct(), called in /home/rahulan/public_html/yii/framework/YiiBase.php on line 219 and defined [/public_html/protected/extensions/sendgrid/SendGrid.php:13]

2.Missing argument 2 for SendGrid::__construct(), called in /home/rahulan/public_html/yii/framework/YiiBase.php on line 219 and defined [/public_html/protected/extensions/sendgrid/SendGrid.php:13]

3.Undefined variable: username [/public_html/protected/extensions/sendgrid/SendGrid.php:15]

4.Call to undefined method SendGrid::init() [/public_html/yii/framework/base/CModule.php:388]

Guys,please help me ou

My guess is that your user model does not have a ‘username’ field.

Check that first. :)

I had a similar issue which I remember vaguely:

What I had is that when trying to create a model class with Gii Yii crashed (or didn’t respond - I don’t remember). The problem was turned out to be something totally unrelated:

When Gii does its stuff Yii would try to load all configured modules (or was it application components?..). There was an error in some other module (or app component) which caused a fatal error. So, the problem was some mal-configured module/app-component.

Check your config/main.php file carefully for bad configuration there. That was where my problem existed. To see Gii working again, comment all unneeded modules/app-components in this file.

[color="#006400"]/* moved from Extensions forum */[/color]