{"action":"created","issue":{"url":"https://api.github.com/repos/dsifford/academic-bloggers-toolkit/issues/161","repository_url":"https://api.github.com/repos/dsifford/academic-bloggers-toolkit","labels_url":"https://api.github.com/repos/dsifford/academic-bloggers-toolkit/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/dsifford/academic-bloggers-toolkit/issues/161/comments","events_url":"https://api.github.com/repos/dsifford/academic-bloggers-toolkit/issues/161/events","html_url":"https://github.com/dsifford/academic-bloggers-toolkit/issues/161","id":178463608,"number":161,"title":"Can't add different citations with the same title","user":{"login":"chrisaldrich","id":5882943,"avatar_url":"https://avatars.githubusercontent.com/u/5882943?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisaldrich","html_url":"https://github.com/chrisaldrich","followers_url":"https://api.github.com/users/chrisaldrich/followers","following_url":"https://api.github.com/users/chrisaldrich/following{/other_user}","gists_url":"https://api.github.com/users/chrisaldrich/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisaldrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisaldrich/subscriptions","organizations_url":"https://api.github.com/users/chrisaldrich/orgs","repos_url":"https://api.github.com/users/chrisaldrich/repos","events_url":"https://api.github.com/users/chrisaldrich/events{/privacy}","received_events_url":"https://api.github.com/users/chrisaldrich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-21T21:12:20Z","updated_at":"2016-09-21T21:25:58Z","closed_at":null,"body":"<!-- Please use this template for all bug reports. -->\r\n<!-- Before submitting an issue, please try disabling all other plugins to ensure the issue is isolated within ABT -->\r\n**ABT Version:** 4.4.0\r\n\r\n<!-- Which version of PHP are you using with your WordPress installation? -->\r\n**PHP Version:** 5.6\r\n\r\n<!-- Which theme are you currently using? -->\r\n2016 (child theme with few modifications)\r\n\r\n**Plugin List:**\r\nIndieWeb Plugins, but likely not the issue\r\n\r\nGoogle Chrome: 53.0.2785.116 (Official Build) m (32-bit)\r\n\r\n<!-- What did you expect to happen? -->\r\n**Expected behavior:**\r\nPut in several book citations with the same title, but different authors/publishers and expected to list them separately.\r\n\r\n<!-- What actually happened? -->\r\n**Actual behavior:**\r\nCitations with the same title name as those previously entered seemed to be rejected and were cited as the original book with that title instead.\r\n\r\n<!-- Open your javascript console on the affected pages by pressing F12 and paste any errors/messages below -->\r\n**Console messages:**\r\n```js\r\nUncaught TypeError: Cannot read property '0' of undefined\r\n/wp-content/plugins/academic-bloggers-toolkit/lib/js/tinymce/components/reference-window/index.js:2 Uncaught TypeError: Cannot read property '0' of undefined\r\n```\r\n\r\n**Additional Notes:**\r\n(TL;DR: It seems like I can't cite five different books which all have the same title.)\r\n\r\nIs it possible that the location you're adding the citations to prevents duplication by rejecting titles with the same name even if the other meta data is different? And then potentially defaulting to the prior citation with that title? I've got several books with the title: Complex Analysis (see http://boffosocko.com/2016/07/25/introduction-to-complex-analysis-ucla-extension/) but can only seem to add one of them. If I add some additional text to other citations with the same title I don't seem to have the same problem. It also appears that if I don't capitalize one of the letters in one of the titles then it gets added as a separate citation and the formatting output of the style handles the capitalization properly.\r\n\r\np.s. Unrelated, but I LOVE the manifesto/philosophy of this plugin!"},"comment":{"url":"https://api.github.com/repos/dsifford/academic-bloggers-toolkit/issues/comments/248747889","html_url":"https://github.com/dsifford/academic-bloggers-toolkit/issues/161#issuecomment-248747889","issue_url":"https://api.github.com/repos/dsifford/academic-bloggers-toolkit/issues/161","id":248747889,"user":{"login":"dsifford","id":5240018,"avatar_url":"https://avatars.githubusercontent.com/u/5240018?v=3","gravatar_id":"","url":"https://api.github.com/users/dsifford","html_url":"https://github.com/dsifford","followers_url":"https://api.github.com/users/dsifford/followers","following_url":"https://api.github.com/users/dsifford/following{/other_user}","gists_url":"https://api.github.com/users/dsifford/gists{/gist_id}","starred_url":"https://api.github.com/users/dsifford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsifford/subscriptions","organizations_url":"https://api.github.com/users/dsifford/orgs","repos_url":"https://api.github.com/users/dsifford/repos","events_url":"https://api.github.com/users/dsifford/events{/privacy}","received_events_url":"https://api.github.com/users/dsifford/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T21:25:58Z","updated_at":"2016-09-21T21:25:58Z","body":"Hi there,\r\n\r\n> Is it possible that the location you're adding the citations to prevents duplication by rejecting titles with the same name even if the other meta data is different? \r\n\r\nThis is precisely correct. That happens [here](https://github.com/dsifford/academic-bloggers-toolkit/blob/master/src/lib/js/reference-list/Store.ts#L24-L28). I had a feeling this might eventually become problematic. \r\n\r\nThe good news is that I'll be able to fix this quite easily. I'll likely just add in a check for author names along with the title and that should be enough to allow for the addition of items with the same name, but prevent duplicate items from being added.\r\n\r\nExpect the fix on the next plugin update 👍 \r\n\r\n\r\n \r\n"}}
{"actor":{"display_login":"dsifford"}}