{"action":"created","issue":{"url":"https://api.github.com/repos/yii2mod/yii2-comments/issues/24","repository_url":"https://api.github.com/repos/yii2mod/yii2-comments","labels_url":"https://api.github.com/repos/yii2mod/yii2-comments/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/yii2mod/yii2-comments/issues/24/comments","events_url":"https://api.github.com/repos/yii2mod/yii2-comments/issues/24/events","html_url":"https://github.com/yii2mod/yii2-comments/issues/24","id":168646455,"number":24,"title":"Comments in modal window","user":{"login":"Gawran","id":4978939,"avatar_url":"https://avatars3.githubusercontent.com/u/4978939?v=4","gravatar_id":"","url":"https://api.github.com/users/Gawran","html_url":"https://github.com/Gawran","followers_url":"https://api.github.com/users/Gawran/followers","following_url":"https://api.github.com/users/Gawran/following{/other_user}","gists_url":"https://api.github.com/users/Gawran/gists{/gist_id}","starred_url":"https://api.github.com/users/Gawran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gawran/subscriptions","organizations_url":"https://api.github.com/users/Gawran/orgs","repos_url":"https://api.github.com/users/Gawran/repos","events_url":"https://api.github.com/users/Gawran/events{/privacy}","received_events_url":"https://api.github.com/users/Gawran/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2016-08-01T13:32:00Z","updated_at":"2018-05-20T20:29:58Z","closed_at":"2016-08-03T14:48:58Z","author_association":"NONE","body":"I used your extension to load comments in a modal window. It worked fine and the page is rendered correctly but after submitting new comment and after a \"success\" response the whole page is reloaded.\n\nAs far as I can say it happens because of the PJAX reload but I do not understand why the whole page gets reloaded instead of only PJAX container. \n\nAny thoughts on this issue would be appreciated. \n"},"comment":{"url":"https://api.github.com/repos/yii2mod/yii2-comments/issues/comments/390510001","html_url":"https://github.com/yii2mod/yii2-comments/issues/24#issuecomment-390510001","issue_url":"https://api.github.com/repos/yii2mod/yii2-comments/issues/24","id":390510001,"user":{"login":"valexus1","id":7592441,"avatar_url":"https://avatars3.githubusercontent.com/u/7592441?v=4","gravatar_id":"","url":"https://api.github.com/users/valexus1","html_url":"https://github.com/valexus1","followers_url":"https://api.github.com/users/valexus1/followers","following_url":"https://api.github.com/users/valexus1/following{/other_user}","gists_url":"https://api.github.com/users/valexus1/gists{/gist_id}","starred_url":"https://api.github.com/users/valexus1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valexus1/subscriptions","organizations_url":"https://api.github.com/users/valexus1/orgs","repos_url":"https://api.github.com/users/valexus1/repos","events_url":"https://api.github.com/users/valexus1/events{/privacy}","received_events_url":"https://api.github.com/users/valexus1/received_events","type":"User","site_admin":false},"created_at":"2018-05-20T20:29:58Z","updated_at":"2018-05-20T20:29:58Z","author_association":"NONE","body":"hello, i've tried some solution without success...\r\n\r\ni have for some reasons a foreach \r\nforeach ($dataProvider->models as $model)  \r\n\r\nand in footer of my page  there is a single static  html bootstrap modal,\r\n when i click to a photo - like instagram desktop -  a js call an ajax request and populate the modal \r\nlike          ` $.ajax({\r\n                    type: \\'POST\\',\r\n                    url : \"'.Url::to(['/wishlist/items/getmodal']).'\",\r\n                    data : {id: selectedId},\r\n                    success: function(result){\r\n                       $(\".modal-body\").html(result); \r\n                }});`   \r\n\r\nin getmodal  i insert this code\r\n\r\n`$modal .=  \\yii2mod\\comments\\widgets\\Comment::widget([\r\n\t\t\t\t\t'model' => $model,\r\n\t\t\t\t\t'relatedTo' => 'User ' . \\Yii::$app->user->identity->username . ' commented on the page ' . \\yii\\helpers\\Url::current(), \r\n\t\t\t\t\t'clientOptions' => [\r\n\t\t\t\t\t\t  'pjaxSettings' => [\r\n\t\t\t\t\t\t\t'url' => \\yii\\helpers\\Url::to(['items/comments', 'id' => $model->id]),\r\n\t\t\t\t\t\t\t'formId' => 'comment-form2',\r\n\t\t\t\t\t\t\t'pjaxContainerId' => 'pjax-container-'.$model->id\r\n\t\t\t\t\t\t]\r\n\t\t\t\t\t]\r\n\t\t\t\t]); `\r\n\r\nwell, when i open the modal i see the comments but nothing works - delete, reply (on click no js error but nothing happens..) - on submit form page goes to /default/create and i see the  {\"status\":\"success\"}\r\n\r\nwhat's wrong in my config?\r\nin my vendor -> itemscontroller \r\n\r\n` public function actionComments($id)\r\n    {\r\n        $model = Items::findOne($id);\r\n        $html = $this->renderAjax('comments', [\r\n            'model' => $model\r\n        ]);\r\n\r\n        return Json::htmlEncode($html);\r\n    }`\r\n"}}
{"actor":{"display_login":"valexus1"}}