(Yiiboilerplate) Share "common" Module

Hi there,

I just began to try YiiBoilerPlate and it’s amazing, but the folder arrangement are sharing the extensions but weirdly not the modules! :blink:

  • Backend

  • |–modules

  • Common

  • Frontend

  • |–modules

Logicaly, I want the Front and Backend to use the same user management module.

So I created a folder named "modules" under common.

[color="#0000FF"]My question is: how can I "Add" a [common] module path for the Front and Backend? so they can both see their own module folder AND share the common ones?[/color]

Thank you for your time :)

You can add something like this in your common/config/main.php:

'import' => array(







          'class' => 'common.modules.user.UserModule',


Yes, I tried already with multiple combination… I think it sees the module folder but cannot resolve the path for the "userGroups.UserGroupsModule.php"

 'import' => array('common.modules.userGroups.components.*',


'components' => array(


                                // enable cookie-based authentication





Alias "userGroups.UserGroupsModule" is invalid. Make sure it points to an existing PHP file and the file is readable.


: $module=Yii::createComponent($class,$id,null,$config);

:/var/www/aeonmirror/common/lib/Yii/base/CModule.php(283): YiiBase::createComponent("userGroups.UserGroupsModule", "userGroups", null, array("accessCode" => "meCode", "salt" => "meSalt"))

It’s when I hit (http://localhost/project/frontend/www/userGroups) that I get this error.

[color="#0000FF"]Is this a route problem?[/color]

Well, I’m using yii-user extension (not yii user management) but I guess the config should be similar. Have you put the complete path like this for ‘modules’?

'modules' => array(


    'class' => 'common.modules.userGroups.UserGroupsModule',

If you have set it like that, but it’s still not working, maybe other expert members can help you :)