yii-user-management
yii-user-management copied to clipboard
Install Issue ... or maybe paths?
Sorry about this noob question, but I've installed fine, except I think I must have the paths wrong as I'm getting: Error 404 Unable to resolve the request "profile/profile/view/id/1".
When trying to view a profile.
OK: I've started again and this time left the protected folder where it was created and reinstalled the module.
Now I'm getting "Alias "ProfileModule.controllers.YumProfileController" is invalid. Make sure it points to an existing directory or file." when clicking on the link in user/user/index.
and I'm getting a 403 when trying to access /user/user/admin after logging in as admin/admin
This sounds like you forgot to 'mount' the profile submodule into your config/main.php 'modules' section. Did you follow the instructions in the README.md file?
Thanks for your reply thyseus: appreciated!
To answer, well, I thought I followed the instructions, but obviously not understood correctly?
I believe I did add the modules correctly, from memory the install script gave the basics? I can post when I get back home if you like...
BTW: I did try and install with Composer, but I couldn't get the version required correct.
OK, back home...
From README.md this is what I've done:
- Unpack and move modules into protected\modules (see below)
- Added 'user' array to modules array in protected\config\main.php
- Edit 'user' management module with YumWebUser
- Add application.modules.user.models.* to import array
- user/Install
- Log in with admin/admin
- user/user/admin fails with 403: "You are not authorized to perform this action."
- profile/profile/view/id/1 fails with "Alias "ProfileModule.controllers.YumProfileController" is invalid. Make sure it points to an existing directory or file."
protected\config\main.php looks like this:
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
'application.modules.user.models.*',
'application.modules.user.components.*',
/* 'application.modules.profile.models.*',
'application.modules.profile.components.*', */
),
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'local',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
),
'user' => array(
'debug' => true,
'userTable' => 'tbl_user',
'translationTable' => 'tbl_translation',
),
'usergroup' => array(
'usergroupTable' => 'tbl_usergroup',
'usergroupMessageTable' => 'tbl_user_group_message',
),
'membership' => array(
'membershipTable' => 'tbl_membership',
'paymentTable' => 'tbl_payment',
),
'friendship' => array(
'friendshipTable' => 'tbl_friendship',
),
'profile' => array(
'privacySettingTable' => 'tbl_privacysetting',
'profileTable' => 'tbl_profile',
'profileCommentTable' => 'tbl_profile_comment',
'profileVisitTable' => 'tbl_profile_visit',
),
'role' => array(
'roleTable' => 'tbl_role',
'userRoleTable' => 'tbl_user_role',
'actionTable' => 'tbl_action',
'permissionTable' => 'tbl_permission',
),
'message' => array(
'messageTable' => 'tbl_message',
),
// application components
'components'=>array(
'user'=>array(
'class' => 'application.modules.user.components.YumWebUser',
// enable cookie-based authentication
'allowAutoLogin'=>true,
'loginUrl' => array('//user/user/login'),
),
[...]
and I've got my protected\modules:
E:\xampp_1.8.3-3\htdocs\test\protected\modules\
avatar
friendship
membership
message
profile
registration
role
user
usergroup
yii-user-management-master
README.md
thanks @scribbly for pointing out, I am getting same error, please let me know if you get any solution.
Unfortunately not yet @sandipp: it must be something super simple I'm not seeing :( but it doesn't lessen the frustration ;)
Open file "ProfileModule.php" and change public variable $controllerMap to this:
public $controllerMap=array(
'comments'=>array(
'class'=>'profile.controllers.YumProfileCommentController'),
'privacy'=>array(
'class'=>'profile.controllers.YumPrivacysettingController'),
'profile'=>array(
'class'=>'profile.controllers.YumProfileController'),
);