{"action":"closed","issue":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/1324","labels_url":"https://api.github.com/repos/phalcon/cphalcon/issues/1324/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/issues/1324/comments","events_url":"https://api.github.com/repos/phalcon/cphalcon/issues/1324/events","html_url":"https://github.com/phalcon/cphalcon/issues/1324","id":20410643,"number":1324,"title":"JsMin breaks remote url in collection","user":{"login":"tomick","id":424941,"avatar_url":"https://avatars.githubusercontent.com/u/424941?v=3","gravatar_id":"","url":"https://api.github.com/users/tomick","html_url":"https://github.com/tomick","followers_url":"https://api.github.com/users/tomick/followers","following_url":"https://api.github.com/users/tomick/following{/other_user}","gists_url":"https://api.github.com/users/tomick/gists{/gist_id}","starred_url":"https://api.github.com/users/tomick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomick/subscriptions","organizations_url":"https://api.github.com/users/tomick/orgs","repos_url":"https://api.github.com/users/tomick/repos","events_url":"https://api.github.com/users/tomick/events{/privacy}","received_events_url":"https://api.github.com/users/tomick/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phalcon/cphalcon/labels/Bug%20-%20Medium","name":"Bug - Medium","color":"d7e102"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2013-10-02T17:51:16Z","updated_at":"2015-08-28T21:49:51Z","closed_at":"2015-08-28T21:49:51Z","body":"In a scenario where we want to be minified file, but loaded from an external domain best of my knowledge the code should look like this:\r\n\r\n```php\r\n$this->assets->collection('jsFooter')\r\n->setLocal(false)\r\n->join(true)\r\n->setPrefix('http://cdn.example.com/')\r\n->setSourcePath($JsDir.$this->config->assets->srcDir)\r\n->setTargetPath($JsDir.'footer.js')\r\n->setTargetUri('header.js')\r\n->addFilter(new Phalcon\\Assets\\Filters\\Jsmin())\r\n->addJs('jquery.min.js');\r\n```\r\n\r\nBut PhalconPHP generating this:\r\n\r\n```html\r\n<script src=\"/http://cdn.example.com/footer.js\" type=\"text/javascript\"></script>\r\n```\r\n\r\ninstead of:\r\n\r\n```html\r\n<script src=\"http://cdn.example.com/footer.js\" type=\"text/javascript\"></script>\r\n```\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1896414-jsmin-breaks-remote-url-in-collection?utm_campaign=plugin&utm_content=tracker%2F50707&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F50707&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}