Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Issue ... or maybe paths? #188

Open
scribbly opened this issue Apr 13, 2014 · 7 comments
Open

Install Issue ... or maybe paths? #188

scribbly opened this issue Apr 13, 2014 · 7 comments

Comments

@scribbly
Copy link

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 scribbly changed the title Install Issue Install Issue ... or maybe paths? Apr 13, 2014
@scribbly
Copy link
Author

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

@thyseus
Copy link
Owner

thyseus commented Apr 14, 2014

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?

@scribbly
Copy link
Author

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
Copy link
Author

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

@sandipp
Copy link

sandipp commented Apr 27, 2014

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

@scribbly
Copy link
Author

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

@Vendict
Copy link

Vendict commented May 26, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants