tingobol / yii-rights

Automatically exported from code.google.com/p/yii-rights
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

When you change the default language bug #50

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.If the user does not have something must be given a message  You are not 
authorized to perform this action. But application givem message about error.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

1.3.0
Please provide any additional information below.

2011/05/11 16:43:59 [error] [php] include(RightsModule.php) [<a 
href='function.include'>function.include</a>]: failed to open stream: No such 
file or directory (D:\www\ispoved\yii-core\YiiBase.php:396)
Stack trace:
#0 unknown(0): spl_autoload_call()
#1 D:\www\ispoved\yii-core\i18n\CPhpMessageSource.php(99): 
ReflectionClass->__construct()
#2 D:\www\ispoved\yii-core\i18n\CPhpMessageSource.php(116): 
CPhpMessageSource->getMessageFile()
#3 D:\www\ispoved\yii-core\i18n\CMessageSource.php(102): 
CPhpMessageSource->loadMessages()
#4 D:\www\ispoved\yii-core\i18n\CMessageSource.php(84): 
CPhpMessageSource->translateMessage()
#5 D:\www\ispoved\yii-core\YiiBase.php(542): CPhpMessageSource->translate()
#6 D:\www\ispoved\protected\modules\rights\components\Rights.php(305): t()
#7 D:\www\ispoved\protected\modules\rights\components\RController.php(56): t()
#8 D:\www\ispoved\protected\modules\rights\components\RightsFilter.php(57): 
DeloController->accessDenied()
#9 D:\www\ispoved\yii-core\web\filters\CFilter.php(39): 
RightsFilter->preFilter()
#10 D:\www\ispoved\protected\modules\rights\components\RController.php(36): 
RightsFilter->filter()
#11 D:\www\ispoved\yii-core\web\filters\CInlineFilter.php(59): 
DeloController->filterRights()
#12 D:\www\ispoved\yii-core\web\filters\CFilterChain.php(130): 
CInlineFilter->filter()
#13 D:\www\ispoved\yii-core\web\CController.php(283): CFilterChain->run()
#14 D:\www\ispoved\yii-core\web\CController.php(257): 
DeloController->runActionWithFilters()
#15 D:\www\ispoved\yii-core\web\CWebApplication.php(328): DeloController->run()
#16 D:\www\ispoved\yii-core\web\CWebApplication.php(121): 
CWebApplication->runController()
#17 D:\www\ispoved\yii-core\base\CApplication.php(155): 
CWebApplication->processRequest()
#18 D:\www\ispoved\index.php(13): CWebApplication->run()
REQUEST_URI=/delo/admin
in D:\www\ispoved\protected\modules\rights\components\Rights.php (305)
in D:\www\ispoved\protected\modules\rights\components\RController.php (56)
in D:\www\ispoved\protected\modules\rights\components\RightsFilter.php (57)

Original issue reported on code.google.com by kolesnik...@gmail.com on 11 May 2011 at 12:52

GoogleCodeExporter commented 9 years ago
Could you provide some more information on what problem is causing this. For 
this description I cannot really do much. Thanks for submitting the issue 
though. :)

Original comment by Christof...@gmail.com on 12 May 2011 at 1:57

GoogleCodeExporter commented 9 years ago
It’s relatively easy to reproduce. Just set a language parameter in your main 
Yii configuration file and you will get this error when accessing a page you 
don’t have rights for.

return array(
  'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
  'name'=>'My Project',
  'language' => 'de',
…

Original comment by r.bugaje...@googlemail.com on 16 May 2011 at 2:46

GoogleCodeExporter commented 9 years ago
Had the same problem and I came up with adding the RightsModule manually to the 
import array into the main.php config file like this:

return array(
...
 'language'=>'el',
 // autoloading model and component classes
 'import'=>array(
  'application.models.*',
  'application.components.*',
  'application.modules.rights.RightsModule', // Add this line to include the RightsModule and to resolve this issue
  'application.modules.rights.models.*',
  'application.modules.rights.components.*',
 ),
...

Original comment by christos...@gmail.com on 11 Dec 2011 at 1:01

GoogleCodeExporter commented 9 years ago
I found this bug on latest versions of Yii and rights module (1.1.10, 
1.3.0.r147)

Adding line 'application.modules.rights.RightsModule' fix that

Fix please

Original comment by fade...@gmail.com on 24 Jul 2012 at 11:42