on my page (own) comments should be edited and deleted via Pjax. While editing works like a charm, deleting doesn’t. The comment is deleted, but it redirects to at least 2 other actions with an error at the end.
Also redirect instead of render doesn’t work. On editing my comment, I work with return $this->renderAjax(’_name’) with works nice, but how can I render a blank view after deleting? Or any other idea? Thanks!
The controller shouldn’t redirect it should only return.
\Yii::$app->response->format = Response::FORMAT_JSON;
Instead of using pjax reload you can just remove the comment in the success portion. It may be a better option if you don't need to refresh all the comments.