yii rights extension rights.php - yii

I am trying to install yii rights and followed what the documentation says
but it shows an error "include(Rights.php): failed to open stream: No such file or directory"
it is there... the extension is under protected/modules/rights and rights.php is under components.
'import'=>array('application.modules.rights.*',
'application.modules.rights.components',
),
'modules'=>array(
'rights'=>array(
'install'=>true,
),
'components'=>array(
'user'=>array(
'allowAutoLogin'=>true,
'class'=>'application.modules.rights.components.RWebUser'
),
'authManager'=>array(
'class'=>'application.modules.rights.components.RDbAuthManager',
),

Related

After pushing laravel 8 project to GitHub repository, click on login or register it says not found

After pushing laravel 8 project to GitHub repository, and cloning back on local the login and register route doesn't exist , it says login not found
This is my web.php file look like
You don't have the auth directory. add this to your web.php
require __DIR__ . '/auth.php';

database not update after install extension with composer in yii2 in SQLSRV connection

i used sqlsrv connection in yii2 and gii is worked correct!
this is my connection :
return [
'class' => 'yii\db\Connection',
'dsn' => 'sqlsrv:Server=DESKTOP-UCQ1M4B;Database=shopping;ConnectionPooling=0',
'username' => '',
'password' => '',
'charset' => 'utf8'
];
but when i want install extension in my Yii2 project extention has not error but database not update for example:
i added this extention in project with this line:
composer require "dektrium/yii2-user:0.9.*#dev"
and this is return of composer :
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing yiisoft/yii2-httpclient (2.0.2)
Loading from cache
- Installing yiisoft/yii2-authclient (2.1.1)
Loading from cache
- Installing dektrium/yii2-user (dev-master a908ab3)
Cloning a908ab3652668c6f2755052098dac09a8c6de6f4 from cache
Writing lock file
Generating autoload files
but database not updated!!!
in mysql connection after install this extention database has update with create 3 table of users profile Structure!

Something went wrong with Facebook php sdk in yii

I installed Facebook php sdk as stated in facebook official doc. Moreover, I loaded application configuration into Facebook\Facebook service and replaced required paramters with my own:
$fb = new Facebook\Facebook([
'app_id' => '{app-id}',
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.8',
]);
However, when I run the project, I got following error:
Fatal error: Class 'Facebook\Facebook' not found in
C:\OpenServer\domains\localhost\blog\protected\controllers\PostController.php
on line 49
I do not know why it is happening. How can i solve it?

Yii links not working properly

In my Yii application I defined rules in Yii's urlManager as follows:
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'izletiste/<grad:\.*?>/<naziv:.*?>/<id:d+>'=>'izletiste/show',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
Now, when I want to create a link, I use the following construction:
<?php echo CHtml::link(CHtml::encode($izletiste->nazivIzletista),array("izletiste/show","grad"=>"Paris","naziv"=>"Some text", "id"=>$id)); ?>
The url I get is the following:
http://mywebsite.com/izletiste/Paris/Some+text/21
But when I click on the link, I get the following error:
Error 404
The system is unable to find the requested action "Paris".
My question is why is that happening, why Yii doesn't recognize that izletiste/show action should be called instead izletiste/paris, and how to fix this?
Try tho change first rule like here:
'izletiste/<grad>/<naziv>/<id:\d+>'=>'izletiste/show'

yiibooster sortable table rows are not working

I have problem with a Yiibooster sortable table rows. It is not working because of two errors.
The file "http://yii-cms.com/protected/extensions/bootstrap/assets/js/jquery.sortable.gridview.js" is not found by the system (404), although the rest of yiibooster files are working and I did installation according to the instructions.
The path to the "jquery.sortable.gridview.js" is generated by the system, I checked it and that file exists.
I installed Yiiboster by writing:
<?php
// main/config.php
Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');
'preload'=>array('log', 'bootstrap'),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
'application.modules.admin.components',
'application.modules.admin.models.*',
'bootstrap.*',
),
// application components
'bootstrap' => array(
'class' => 'bootstrap.components.Bootstrap',
),
?>
The second error occurs in view file, near the 'afterSortableUpdate' property.
Uncaught TypeError: undefined is not a function
Please give me some advice. Thanks.
This looks like a bug of YiiBooster, try it with the newest version or you may report it here. Please mention your Yii version and YiiBooster version.
The assets need to be properly registered within Yii, so that they are cached in the assets folder. The protected folder is protected and requests to it are blocked.