Open ajkosh opened 6 years ago
Hi, please provide a little bit more information if you want some help :)
@machour in yii2 admin rbac using render json data to listbox. see here which is rendering json and code is there line no 16 https://github.com/mdmsoft/yii2-admin/blob/master/views/route/index.php
and how did you configure the notifications module ? What url are you calling to get this JSON ?
i have module notification
'notifications' => [
'class' => 'machour\yii2\notifications\NotificationsModule',
// Point this to your own Notification class
// See the "Declaring your notifications" section below
'notificationClass' => 'app\modules\notification_manager\modules\core\models\Notification',
// Allow to have notification with same (user_id, key, key_id)
// Default to FALSE
'allowDuplicate' => false,
// Allow custom date formatting in database
'dbDateFormat' => 'Y-m-d H:i:s',
// This callable should return your logged in user Id
'userId' => function() {
return \Yii::$app->user->id;
}
],
model code same as u mentioned in documentation .
I don't see how this module can be responsible for the problem you're facing. Could you publish a repository reproducing the problem?
On Jan 4, 2018 14:40, "ajkosh" notifications@github.com wrote:
i have module notification
'notifications' => [ 'class' => 'machour\yii2\notifications\NotificationsModule', // Point this to your own Notification class // See the "Declaring your notifications" section below 'notificationClass' => 'app\modules\notification_manager\modules\core\models\Notification', // Allow to have notification with same (user_id, key, key_id) // Default to FALSE 'allowDuplicate' => false, // Allow custom date formatting in database 'dbDateFormat' => 'Y-m-d H:i:s', // This callable should return your logged in user Id 'userId' => function() { return \Yii::$app->user->id; } ],
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/machour/yii2-notifications/issues/49#issuecomment-355284539, or mute the thread https://github.com/notifications/unsubscribe-auth/AASlQvkjo92xlCl4dtu2Rq_CUadSxiUTks5tHNTcgaJpZM4RSoco .
even slim scroll also not working. https://github.com/mdmsoft/yii2-admin/blob/master/views/route/index.php here is line 16 showing json data. ur poll action alse reflecting json data. so if ur plugin is enable it shows raw json .
@ajkosh again, I'm using this plugin along with others without any problems. Please set up a reproduce case if you want help
@machour when i implemented notificationmodule it is giving me permission error
{name: "Forbidden", message: "You are not allowed to perform this action.", code: 0, status: 403,…}
code
:
0
message
:
"You are not allowed to perform this action."
name
:
"Forbidden"
status
:
403
type
:
"yii\web\ForbiddenHttpException"
For what URL?
@machour sorry forgot to mention url. for this http://localhost/project/web/notifications/notifications/poll?seen=0
@machour Did you try this with yii2 admin.
No I did not. It looks to me that you have an authorization problem. Check your yii2 admin configuration.
@machour i checked what when i m trying it is showing yii2 admin like this coz your notification module is enabled https://user-images.githubusercontent.com/8582472/34552850-126ca7dc-f14a-11e7-845c-bf471d49a41b.png
@machour it has some error with yii2 admin.when your module enabled it shows json raw data and if i remove your module from config i cant give permission in rbac
@ajkosh the Notification controller is a AJAX only controller. I think it's time you get your hands dirty by modifying the module code under vendor/machour/yii2-notifications/ to find the problem.
Try commenting out this line and see what happens: https://github.com/machour/yii2-notifications/blob/master/controllers/NotificationsController.php#L29 Maybe you'll see the error message you're missing out.
Also check your Yii2 error logs, etc ..
@machour i did nt touch vendor notification code
You will have to in order to find the problem
after installing your widget .in yii2 admin json data is is coming as raw html. it is conflicting with other widget those are rendering json data .