yii-user-management icon indicating copy to clipboard operation
yii-user-management copied to clipboard

Install Issue ... or maybe paths?

Open scribbly opened this issue 11 years ago • 7 comments

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.

scribbly avatar Apr 13 '14 13:04 scribbly

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

scribbly avatar Apr 14 '14 10:04 scribbly

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?

thyseus avatar Apr 14 '14 16:04 thyseus

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.

scribbly avatar Apr 15 '14 00:04 scribbly

OK, back home...

From README.md this is what I've done:

  1. Unpack and move modules into protected\modules (see below)
  2. Added 'user' array to modules array in protected\config\main.php
  3. Edit 'user' management module with YumWebUser
  4. Add application.modules.user.models.* to import array
  5. user/Install
  6. Log in with admin/admin
  7. user/user/admin fails with 403: "You are not authorized to perform this action."
  8. 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

scribbly avatar Apr 15 '14 08:04 scribbly

thanks @scribbly for pointing out, I am getting same error, please let me know if you get any solution.

sandipp avatar Apr 27 '14 12:04 sandipp

Unfortunately not yet @sandipp: it must be something super simple I'm not seeing :( but it doesn't lessen the frustration ;)

scribbly avatar Apr 27 '14 12:04 scribbly

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'),
  );

Vendict avatar May 26 '14 11:05 Vendict