{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/6117","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6117/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6117/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6117/events","html_url":"https://github.com/joomla/joomla-cms/issues/6117","id":57997244,"number":6117,"title":"JDocumentHTML::addHeadLink doesn't allow adding different links to same URI (new in 2.5)","user":{"login":"dimamizou","id":11052066,"avatar_url":"https://avatars.githubusercontent.com/u/11052066?v=3","gravatar_id":"","url":"https://api.github.com/users/dimamizou","html_url":"https://github.com/dimamizou","followers_url":"https://api.github.com/users/dimamizou/followers","following_url":"https://api.github.com/users/dimamizou/following{/other_user}","gists_url":"https://api.github.com/users/dimamizou/gists{/gist_id}","starred_url":"https://api.github.com/users/dimamizou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimamizou/subscriptions","organizations_url":"https://api.github.com/users/dimamizou/orgs","repos_url":"https://api.github.com/users/dimamizou/repos","events_url":"https://api.github.com/users/dimamizou/events{/privacy}","received_events_url":"https://api.github.com/users/dimamizou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-17T23:08:20Z","updated_at":"2015-02-17T23:16:46Z","closed_at":null,"body":"#### Steps to reproduce the issue\r\nAdd this code somewhere in a system plugin:\r\n\r\n$document = JFactory::getDocument();\r\n$document->addHeadLink('/mysite/site-map', 'next', 'rel');\r\n$document->addHeadLink('/mysite/site-map', 'contents', 'rel');\r\n\r\n#### Expected result\r\nThe resulting HTML should contain multiple links to /mysite/site-map (ít is not only allowed but also very legitimate case):\r\n<link href=\"/mysite/site-map\" rel=\"next\"/>\r\n<link href=\"/mysite/site-map\" rel=\"contents\"/>\r\n\r\n#### Actual result\r\nResulting HTML contains only the link added at last:\r\n<link href=\"/mysite/site-map\" rel=\"contents\"/>\r\n\r\n#### System information (as much as possible)\r\nPHP Built On \tLinux 2.6.32-504.8.1.el6.i686 #1 SMP Wed Jan 28 18:25:26 UTC 2015 i686\r\nDatabase Version \t5.1.73\r\nDatabase Collation \tutf8_general_ci\r\nPHP Version \t5.3.3\r\nWeb Server \tApache/2.2.15 (CentOS)\r\nWebServer to PHP Interface \tapache2handler\r\nJoomla! Version \tJoomla! 2.5.11 Stable [ Ember ] 26-April-2013 14:00 GMT\r\nJoomla! Platform Version \tJoomla Platform 11.4.0 Stable [ Brian Kernighan ] 03-Jan-2012 00:00 GMT \r\n\r\n#### Additional comments\r\nThis behaviour (introduced in 2.5) leads to unpredictable results in HTML head, especially when addHeadLink is called from different places (extensions, plugins). The reason, why JDocumentHTML must store the links in a map by HREF, is beyond my comprehension. The unique key for head links should be (if any) HREF+REL.\r\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/74776575","html_url":"https://github.com/joomla/joomla-cms/issues/6117#issuecomment-74776575","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6117","id":74776575,"user":{"login":"dimamizou","id":11052066,"avatar_url":"https://avatars.githubusercontent.com/u/11052066?v=3","gravatar_id":"","url":"https://api.github.com/users/dimamizou","html_url":"https://github.com/dimamizou","followers_url":"https://api.github.com/users/dimamizou/followers","following_url":"https://api.github.com/users/dimamizou/following{/other_user}","gists_url":"https://api.github.com/users/dimamizou/gists{/gist_id}","starred_url":"https://api.github.com/users/dimamizou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimamizou/subscriptions","organizations_url":"https://api.github.com/users/dimamizou/orgs","repos_url":"https://api.github.com/users/dimamizou/repos","events_url":"https://api.github.com/users/dimamizou/events{/privacy}","received_events_url":"https://api.github.com/users/dimamizou/received_events","type":"User","site_admin":false},"created_at":"2015-02-17T23:16:45Z","updated_at":"2015-02-17T23:16:45Z","body":"I don't know why, but this fancy editor swallowed the half of my text in **Expected result** and **Actual result** although preview displayed everything ok. It must have been some \"special chars\" or whatsoever.\nI must say: **I don't have time to learn another freaking Wiki markup! Link \"Markup Help\" here or use TEXTAREA!**<hr /><sub>This comment was created with the <a href=\"https://github.com/joomla/jissues\">J!Tracker Application</a> at <a href=\"http://issues.joomla.org/tracker/joomla-cms/6117\">issues.joomla.org/joomla-cms/6117</a>.</sub>"}}