fatal error after migration

1.8 related questions and discussions.
Please upgrade to LATEST 1.9.x.
No more fixes for 1.8.

Moderators: Amaradana, TurboPT, TL Developers

fatal error after migration

Postby diegodinardo » Sun Mar 29, 2009 9:31 pm

Hi, after the migration from 1.7.4 to 1.8.0, with no error messages in the process, when i go to execute the test cases, i get, in the frame of the tree, the error:

Fatal error: Call to a member function hasRight() on a non-object in /var/www/testlink/lib/functions/users.inc.php on line 307

somebody know where is the my error?

thanks

regards.
diegodinardo
TestLink user
 
Posts: 10
Joined: Fri Oct 24, 2008 7:04 pm

Postby protonic » Wed Apr 22, 2009 11:15 am

same problem (different only start point version of migration 1.7.5).

it seams that roleinfo object is not initialized anywhere before in code...

still try to find possible solution. may be dev can helps.

finded results of occur in hole folder of testlink:
Code: Select all
Search "roleInfo" (6 hits in 2 files)
  E:\webserver\home\localtestlink\www\lib\functions\users.inc.php (4 hits)
   Line 305:     foreach($users_roles as $keyUserID => $roleInfo)
   Line 307:           if($roleInfo['effective_role']->hasRight('testplan_execute') && $roleInfo['user']->bActive)
   Line 307:           if($roleInfo['effective_role']->hasRight('testplan_execute') && $roleInfo['user']->bActive)
   Line 309:               $userFilter[$keyUserID] = $roleInfo['user'];
  E:\webserver\home\localtestlink\www\lib\usermanagement\usersEdit.php (2 hits)
   Line 343:     $roleInfo = tlRole::getByID($dbHandler,$roleID);
   Line 344:     return $roleInfo->name;


may be importance.
final version that has this trouble was loaded from this link http://sourceforge.net/project/showfile ... _id=673555
protonic
TestLink user
 
Posts: 5
Joined: Wed Apr 22, 2009 6:00 am

Postby diegodinardo » Thu May 14, 2009 8:05 pm

I found the problem, i had a user in the database with 0 in the role-id. There is no problem testlink 1.7.x, but in 1.8.x there is, when you want to execute the testcases show the fatal error. The solution was change the value of the role-id.
diegodinardo
TestLink user
 
Posts: 10
Joined: Fri Oct 24, 2008 7:04 pm

Postby protonic » Wed May 20, 2009 7:56 am

yes, it works. thanks for solutions, diegodinardo. :idea:

I'm change role_id in table 'users' from 0 in 1 row where it was and problem disappear. :D
protonic
TestLink user
 
Posts: 5
Joined: Wed Apr 22, 2009 6:00 am


Return to TestLink 1.8 (OBSOLETE => EOL)[LOCKED]



Who is online

Users browsing this forum: No registered users and 2 guests