{"action":"created","issue":{"url":"https://api.github.com/repos/harvesthq/chosen/issues/2698","repository_url":"https://api.github.com/repos/harvesthq/chosen","labels_url":"https://api.github.com/repos/harvesthq/chosen/issues/2698/labels{/name}","comments_url":"https://api.github.com/repos/harvesthq/chosen/issues/2698/comments","events_url":"https://api.github.com/repos/harvesthq/chosen/issues/2698/events","html_url":"https://github.com/harvesthq/chosen/issues/2698","id":178733329,"number":2698,"title":"\"Cannot read property 'length' of undefined\" error","user":{"login":"shakedg","id":8568906,"avatar_url":"https://avatars.githubusercontent.com/u/8568906?v=3","gravatar_id":"","url":"https://api.github.com/users/shakedg","html_url":"https://github.com/shakedg","followers_url":"https://api.github.com/users/shakedg/followers","following_url":"https://api.github.com/users/shakedg/following{/other_user}","gists_url":"https://api.github.com/users/shakedg/gists{/gist_id}","starred_url":"https://api.github.com/users/shakedg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shakedg/subscriptions","organizations_url":"https://api.github.com/users/shakedg/orgs","repos_url":"https://api.github.com/users/shakedg/repos","events_url":"https://api.github.com/users/shakedg/events{/privacy}","received_events_url":"https://api.github.com/users/shakedg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-22T22:08:17Z","updated_at":"2016-09-23T07:05:08Z","closed_at":"2016-09-23T07:05:08Z","body":"I downloaded the project's zip files to use it in my website design. \r\nI also added this code line in my HTML home page (as without it the Chosen code wasn't recognized, I hope this is what I should've done):\r\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/chosen/1.4.2/chosen.jquery.js\"></script>\r\n\r\nAnd now when I run it, I get an exception saying \"Cannot read property 'length' of undefined\". It refers to this part, \"this.form_field.options.length\", in the \"chosen.jquery.js\" file (it is in the function assigned to the \"Chosen.prototype.results_build\" variable).\r\n\r\nWhat is the issue here? \r\n\r\n\r\n\r\n\r\n<!---\r\nPlease read our Contributing Guidelines before opening this issue: https://github.com/harvesthq/chosen/blob/master/contributing.md\r\n\r\nSpecifically, please note that the issue tracker is intended for bug reports and specific feature requests.\r\n\r\nIf you have a general support or usage question, please post somewhere like StackOverflow using the `jquery-chosen` tag: http://stackoverflow.com/questions/tagged/jquery-chosen — you'll be much more likely to get a quick answer there.\r\n-->\r\n\r\nSummarize your issue here.\r\n\r\n### Steps to reproduce\r\n\r\nTell us how to reproduce this issue.\r\n\r\n  1. This is the first step\r\n\r\n  2. This is the second step\r\n\r\n  3. Further steps, etc.\r\n\r\nAdditionally, please link to a working demo that shows the issue so we can attempt to reproduce.  You can use [this template](https://jsfiddle.net/5v3v353z/) as a base.  Alternatively, confirm that the [Chosen demo page](http://harvesthq.github.io/chosen/) shows the issue.\r\n\r\n\r\n### Expected behavior\r\n\r\nTell us what should happen.\r\n\r\n\r\n### Actual behavior\r\n\r\nTell us what happens instead.\r\n\r\n\r\n### Environment\r\n\r\n  - **Chosen Version**:\r\n\r\n  - **jQuery or Prototype Version**:\r\n\r\n  - **Browser and Version**:\r\n\r\n  - **OS and Version**:\r\n\r\n\r\n### Additional information\r\n\r\nAny other information you want to share that is relevant to the issue being reported. This might include the lines of code that you have identified as causing the bug, or potential solutions and workarounds.\r\n"},"comment":{"url":"https://api.github.com/repos/harvesthq/chosen/issues/comments/249118258","html_url":"https://github.com/harvesthq/chosen/issues/2698#issuecomment-249118258","issue_url":"https://api.github.com/repos/harvesthq/chosen/issues/2698","id":249118258,"user":{"login":"koenpunt","id":351038,"avatar_url":"https://avatars.githubusercontent.com/u/351038?v=3","gravatar_id":"","url":"https://api.github.com/users/koenpunt","html_url":"https://github.com/koenpunt","followers_url":"https://api.github.com/users/koenpunt/followers","following_url":"https://api.github.com/users/koenpunt/following{/other_user}","gists_url":"https://api.github.com/users/koenpunt/gists{/gist_id}","starred_url":"https://api.github.com/users/koenpunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koenpunt/subscriptions","organizations_url":"https://api.github.com/users/koenpunt/orgs","repos_url":"https://api.github.com/users/koenpunt/repos","events_url":"https://api.github.com/users/koenpunt/events{/privacy}","received_events_url":"https://api.github.com/users/koenpunt/received_events","type":"User","site_admin":false},"created_at":"2016-09-23T07:05:08Z","updated_at":"2016-09-23T07:05:08Z","body":"Hi @shakedg, the issue template isn't there for nothing, so please use it as described. Because now we can only guess what's happening. And so my guess would be; you're not applying Chosen to a select but to another element. \r\nPlease update the issue and I'll be happy to reopen."}}
{"actor":{"display_login":"koenpunt"}}