I am working on a project in YII. I have planned to develop the site modules based. Everything was working fine but today I created a module and imported it the main module. now, when i go to the site at my localhost the browser displays the The connection was reset page. here is the code
Users Model in /modules/users/models/Users.php
public function relations()
{
Yii::import('application.modules.companies.models.Company');
Yii::import('application.modules.clients.models.Clients');
Yii::import('application.modules.events.models.Events');
Yii::import('application.modules.notifications.models.UserNotifications');
Yii::import('application.modules.tasks.models.UserTasks');
return array(
...
'contacts' => array(self::HAS_MANY, 'UserLeeds', 'user_id'),
'userNotifications' => array(self::HAS_MANY, 'UserNotifications', 'user_id'),
'userTasks' => array(self::HAS_MANY, 'UserTasks', 'user_id'),
'userRole' => array(self::BELONGS_TO, 'Roles', 'user_role'),
'userCompany' => array(self::BELONGS_TO, 'Company', 'user_company_id'),
'userClient' => array(self::BELONGS_TO, 'Clients', 'user_client_id'),
);
}
Notifications Model in /modules/notifications/models/UserNotifications.php
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'notificationType' => array(self::BELONGS_TO, 'Notifications', 'notification_type'),
'user' => array(self::BELONGS_TO, 'Users', 'user_id'),
);
}
If in the Users Model I comment out the
Yii::import('application.modules.notifications.models.UserNotifications');
line all works fine.
Any idea what I am missing here.
UPDATE
Well, just found that if I comment out any of the imported modules it works fine then…
does this mean YII limits the import of module/models to other module/modle to only 4?
Regards