{"action":"opened","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/10509","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/10509/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/10509/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/10509/events","html_url":"https://github.com/yiisoft/yii2/issues/10509","id":124415857,"number":10509,"title":"PJAX removes important scripts if it is placed in layout","user":{"login":"KROT47","id":10371779,"avatar_url":"https://avatars.githubusercontent.com/u/10371779?v=3","gravatar_id":"","url":"https://api.github.com/users/KROT47","html_url":"https://github.com/KROT47","followers_url":"https://api.github.com/users/KROT47/followers","following_url":"https://api.github.com/users/KROT47/following{/other_user}","gists_url":"https://api.github.com/users/KROT47/gists{/gist_id}","starred_url":"https://api.github.com/users/KROT47/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KROT47/subscriptions","organizations_url":"https://api.github.com/users/KROT47/orgs","repos_url":"https://api.github.com/users/KROT47/repos","events_url":"https://api.github.com/users/KROT47/events{/privacy}","received_events_url":"https://api.github.com/users/KROT47/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-30T23:59:18Z","updated_at":"2015-12-30T23:59:18Z","closed_at":null,"body":"e.g. If you put Pjax in layout and ActiveForm in view then comes:\r\n1 view execution\r\n* ActiveForm assets registration\r\n\r\n2 layout execution\r\n* Pjax::begin(), which launches $view->clear() - here ActiveForm Assets would be removed\r\n\r\nSo in the end ActiveForm stays without JS assets\r\nMaybe you should remove $view->clear() from Pjax::init or replace it?\r\n\r\nThanks!"}}