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

"YumUser.profile" is not defined.

Open larry-tx opened this issue 12 years ago • 3 comments

I love your module; unfortunately, I'm having problems getting it to work. (Most likely my fault, but I'd appreciate any help I can get.) Basically, here's what's going on. I downloaded and installed User Management on a clean install of Yii 1.1.14. The only changes that I made to Yii was to provide for clean URLs (no script name showing, no ?r= parameters), enable Gii, and connect to a MySQL database.

I did a download of User Managment from GitHub yesterday and put it in the modules directory of my Yii install. I followed the instructions in /user/docs completely, running the /user/install script. It correctly created the tables in my database. Then I went to /user/user/login and logged in with admin/admin.

Then I went to /user/user/admin which displayed correctly. There, my problems began. I attempted to create a new user, and received a _Property "YumUser.profile" is not defined._ error. Now, it won't let me get back to the /user/user/admin page; it just keeps displaying the _Property "YumUser.profile" is not defined._ error.

By the way, I did copy and paste the following in the Modules section of main.php:

'user'       => array(
            'debug'            => FALSE,
            'userTable'        => 'user',
            'translationTable' => 'translation',
        ),
        'usergroup'  => array(
            'usergroupTable'        => 'usergroup',
            'usergroupMessageTable' => 'user_group_message',
        ),
        'membership' => array(
            'membershipTable' => 'membership',
            'paymentTable'    => 'payment',
        ),
        'friendship' => array(
            'friendshipTable' => 'friendship',
        ),
        'profile'    => array(
            'privacySettingTable' => 'privacysetting',
            'profileTable'        => 'profile',
            'profileCommentTable' => 'profile_comment',
            'profileVisitTable'   => 'profile_visit',
        ),
        'role'       => array(
            'roleTable'       => 'role',
            'userRoleTable'   => 'user_role',
            'actionTable'     => 'action',
            'permissionTable' => 'permission',
        ),
        'message'    => array(
            'messageTable' => 'message',
        ),

All of the referenced tables do exist in the database.

Any help you can provide will be most appreciated.

larry-tx avatar Aug 31 '13 13:08 larry-tx

Hey, thanks for trying yum!

Did you use the 0.8 release or git master? is there a profile for the administrator in the 'profile' table ? If not, try to create it (insert into profile (user_id) values (1);

thyseus avatar Sep 02 '13 09:09 thyseus

Actually, I did a new installation on a fresh installation of Yii. I cloned YUM git-master and went through all the installation steps. The tables were created correctly, and there is a profile for the administrator in the profiles table. Now, things got much worse.

I tried to create a new user and got this error message after completing all thef ields:

CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1. The SQL statement executed was: delete from user_role where user_id = 

Then, I created a new Role. That went OK, but when I clicked "Grant Permission," I got this:

Fields with * are required.
Do you want to grant this permission to a user or a role
User
Role    
Principal * 
Fatal error: Cannot re-assign auto-global variable _POST in L:\xampp\htdocs\yum\protected\modules\user\components\Relation.php on line 723

This was displayed as raw text (no CSS, no layout, just black text on a white background).

Hope that helps. Let me know if you need more information.

larry-tx avatar Sep 02 '13 13:09 larry-tx

I have a same issue, please help! (=

akosmenyhert avatar Sep 17 '13 10:09 akosmenyhert