{"action":"created","issue":{"url":"https://api.github.com/repos/vwochnik/jekyll-language-plugin/issues/19","repository_url":"https://api.github.com/repos/vwochnik/jekyll-language-plugin","labels_url":"https://api.github.com/repos/vwochnik/jekyll-language-plugin/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/vwochnik/jekyll-language-plugin/issues/19/comments","events_url":"https://api.github.com/repos/vwochnik/jekyll-language-plugin/issues/19/events","html_url":"https://github.com/vwochnik/jekyll-language-plugin/issues/19","id":148978457,"number":19,"title":"Default permalink language not working for collections","user":{"login":"git-no","id":6242406,"avatar_url":"https://avatars.githubusercontent.com/u/6242406?v=3","gravatar_id":"","url":"https://api.github.com/users/git-no","html_url":"https://github.com/git-no","followers_url":"https://api.github.com/users/git-no/followers","following_url":"https://api.github.com/users/git-no/following{/other_user}","gists_url":"https://api.github.com/users/git-no/gists{/gist_id}","starred_url":"https://api.github.com/users/git-no/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/git-no/subscriptions","organizations_url":"https://api.github.com/users/git-no/orgs","repos_url":"https://api.github.com/users/git-no/repos","events_url":"https://api.github.com/users/git-no/events{/privacy}","received_events_url":"https://api.github.com/users/git-no/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-17T18:14:09Z","updated_at":"2016-04-18T04:47:02Z","closed_at":null,"body":"The permalink language setting does not work with **collections**,\r\n\r\nScenario a.) default permalink is set in _config.yml\r\n\r\n```\r\ncollections:\r\n  mycollection:\r\n    output: true\r\n\r\ndefaults:\r\n  - scope:\r\n      path: \"\"\r\n      type: \"posts\"\r\n    values:\r\n      path: \"_posts\"\r\n      layout: post\r\n      permalink: /:language/:categories/:path/\r\n  - scope:\r\n      path: \"\"\r\n      type: mycollection\r\n    values:\r\n      layout: page\r\n      permalink: /:language/:collection/:title/\r\n      subset: mycollection\r\n```\r\n\r\n```jekyll b ```quits with an error\r\n\r\n```\r\nError: could not read file /Users/me/Development/www/_mycollection/master.md: undefined method `language' for #<Jekyll::Drops::UrlDrop:0x007fe40201c028>\r\njekyll 3.1.2 | Error:  undefined method `language' for #<Jekyll::Drops::UrlDrop:0x007ff375078508>\r\n```\r\n\r\nScenario b) permalink in each file - it works when the permalink is set in each collection **file** in the YAML (which is additional work).\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/vwochnik/jekyll-language-plugin/issues/comments/211199233","html_url":"https://github.com/vwochnik/jekyll-language-plugin/issues/19#issuecomment-211199233","issue_url":"https://api.github.com/repos/vwochnik/jekyll-language-plugin/issues/19","id":211199233,"user":{"login":"git-no","id":6242406,"avatar_url":"https://avatars.githubusercontent.com/u/6242406?v=3","gravatar_id":"","url":"https://api.github.com/users/git-no","html_url":"https://github.com/git-no","followers_url":"https://api.github.com/users/git-no/followers","following_url":"https://api.github.com/users/git-no/following{/other_user}","gists_url":"https://api.github.com/users/git-no/gists{/gist_id}","starred_url":"https://api.github.com/users/git-no/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/git-no/subscriptions","organizations_url":"https://api.github.com/users/git-no/orgs","repos_url":"https://api.github.com/users/git-no/repos","events_url":"https://api.github.com/users/git-no/events{/privacy}","received_events_url":"https://api.github.com/users/git-no/received_events","type":"User","site_admin":false},"created_at":"2016-04-18T04:47:01Z","updated_at":"2016-04-18T04:47:01Z","body":"The error with collections can be reproduced. I created a small Jekyll repo for testing posts, pages, collections. I send the repo attached to this issue:\r\n[language-test.zip](https://github.com/vwochnik/jekyll-language-plugin/files/223089/language-test.zip)\r\n\r\nIn the homepage at the footer are the links to en,de posts, pages, collections.\r\nFor collection ```jekyll s``` outputs the error \r\n```\r\nError: could not read file /Users/me/Development/language-test/_my_collection/first.html: undefined method `language' for #<Jekyll::Drops::UrlDrop:0x007fb163d352b8>\r\n``` \r\n**but succeeded building _site directory. Also the collection files are built and do exists in _site.**"}}