I’ve installed the latest release and everything works fine ‘out of the box’ …except (of course ) I’m getting the following JS error :
$tbody.sortable is not a function
http://localhost/project/yii-1.1.3/assets/346a9ce9/js/rights.js
Line 133
This occurs on following grid view :
rights/authItem/roles
rights/authItem/tasks
rights/authItem/operations
For ‘assignations’ and ‘Permissions’ no error. This is not really a problem to use the extension, but as the perfectionist you are, I thought you would like to know
(by the way, I will send you updated french message files as soon as possible)
@raoul: Are you running the latest version with zii checked out from the yii repository (after zii was merged into the yii repository)? It would seem like your application doesn’t find the jquery-ui script file. I’ve tested that it works as it should. If everything is working as it should, it should be possible to register jquery-ui as a core script. Please check the yii change log for further information.
the install script went ok, but there is not menu in the interface - i don’t see any of the buttons i see in the screen shots - Permissions, assignments, etc. the ?r=rights page loads with a table of users with no navigation items.
also, i see you created a table called AuthItemWeight. i need to use a custom name for the table, specifically have a prefix of tbl_, (this is already in my db config).
in my config i put the following and it seems to be using my table names ok:
‘authManager’=>array(
//'class'=>'CDbAuthManager',
'class'=>'RightsAuthManager',
// The database component used
'connectionID'=>'db',
// The itemTable name (default:authitem)
'itemTable'=>'auth_item',
// The assignmentTable name (default:authassignment)
'assignmentTable'=>'auth_assignment',
// The itemChildTable name (default:authitemchild)
'itemChildTable'=>'auth_item_child',
),
@unbelievable luck: You could configure your authorization manager as following before you run the installer (the installer uses the authorization manager table names when inserting the tables):
'authManager'=>array(
// The authorization manager (default: CDbAuthManager)
'class'=>'RightsAuthManager',
// The database component used
'connectionID'=>'db',
// The itemTable name (default: AuthItem)
'itemTable'=>'auth_item',
// The assignmentTable name (default: AuthAssignment)
'assignmentTable'=>'auth_assignment',
// The itemChildTable name (default: AuthItemChild)
'itemChildTable'=>'auth_item_child',
// The itemWeightTable (default: AuthItemWeight)
'itemWeightTable'=>'auth_item_weight',
),
About the problem with the menu, could you check if the CMenu-widget is rendered at all and that the user you’re logged in as is a superuser. You can check this with:
i’m not quite sure how to check if the menu is rendered, but when i look at the html source code, i have div with id “menu” that is empty. also an empty “flashes” div.
After operation preservation, we receive an error in line 00451.
Though all data remains.
PHP Error
Описание
preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: missing terminating ] for character class at offset 30
Исходный код
I:\home\league.ru\www\protected\modules\rights\components\RightsAuthorizer.php(451)
00439: // Loop through the language constructs
00440: foreach( $languageConstructs as $lc )
00441: if( preg_match('/'.$lc.'\ *\(?\ *[\"\']+/', $code)>0 )
00442: return null; // Language construct found, not safe for eval
00443:
00444: // Get a list of all defined functions
00445: $definedFunctions = get_defined_functions();
00446: $functions = array_merge($definedFunctions['internal'], $definedFunctions['user']);
00447:
00448: // Loop through the functions and check the code for function calls
00449: // Append a '(' to the functions to avoid confusion between e.g. array() and array_merge()
00450: foreach( $functions as $f )
00451: if( preg_match('/'.$f.'\ *\({1}/', $code)>0 )
00452: return null; // Function call found, not safe for eval
00453:
00454: // Evaluate the safer code
00455: $result = @eval($code);
00456:
00457: // Return the evaluated code or null if the result was false
00458: return $result!==false ? $result : null;
00459: }
00460:
00461: /**
00462: * @return RightsAuthManager the authorization manager
00463: */
Содержимое стека
#0 I:\home\www\protected\modules\rights\components\RightsAuthorizer.php(451): preg_match()
#1 I:\home\www\protected\modules\rights\components\RightsAuthorizer.php(76): RightsAuthorizer->sanitizeExpression()
#2 I:\home\www\protected\modules\rights\controllers\AuthItemController.php(303): RightsAuthorizer->updateAuthItem()
#3 I:\home\www\core\web\actions\CInlineAction.php(50): AuthItemController->actionUpdate()
#4 I:\home\www\core\web\CController.php(300): CInlineAction->run()
#5 I:\home\www\core\web\filters\CFilterChain.php(133): AuthItemController->runAction()
#6 I:\home\www\core\web\filters\CFilter.php(41): CFilterChain->run()
#7 I:\home\www\core\web\CController.php(1049): CAccessControlFilter->filter()
#8 I:\home\www\core\web\filters\CInlineFilter.php(59): AuthItemController->filterAccessControl()
#9 I:\home\www\core\web\filters\CFilterChain.php(130): CInlineFilter->filter()
#10 I:\home\www\core\web\CController.php(283): CFilterChain->run()
#11 I:\home\www\core\web\CController.php(257): AuthItemController->runActionWithFilters()
#12 I:\home\www\core\web\CWebApplication.php(324): AuthItemController->run()
#13 I:\home\www\core\web\CWebApplication.php(121): CWebApplication->runController()
#14 I:\home\www\core\base\CApplication.php(135): CWebApplication->processRequest()
#15 I:\home\www\index.php(13): CWebApplication->run()
The data field does not currently support function calls for security reasons. I will check if it would be possible to allow some function calls when I can find the time to do so.
Could you make sure that this is the problem by checking the same without calling a function.