{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/6082","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6082/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6082/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6082/events","html_url":"https://github.com/joomla/joomla-cms/pull/6082","id":57635497,"number":6082,"title":"[#6054] - SQL Errors in search tag with MSSQL.","user":{"login":"alikon","id":181681,"avatar_url":"https://avatars.githubusercontent.com/u/181681?v=3","gravatar_id":"","url":"https://api.github.com/users/alikon","html_url":"https://github.com/alikon","followers_url":"https://api.github.com/users/alikon/followers","following_url":"https://api.github.com/users/alikon/following{/other_user}","gists_url":"https://api.github.com/users/alikon/gists{/gist_id}","starred_url":"https://api.github.com/users/alikon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alikon/subscriptions","organizations_url":"https://api.github.com/users/alikon/orgs","repos_url":"https://api.github.com/users/alikon/repos","events_url":"https://api.github.com/users/alikon/events{/privacy}","received_events_url":"https://api.github.com/users/alikon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/joomla/joomla-cms/milestones/11","html_url":"https://github.com/joomla/joomla-cms/milestones/Joomla!%203.4.5","labels_url":"https://api.github.com/repos/joomla/joomla-cms/milestones/11/labels","id":1269516,"number":11,"title":"Joomla! 3.4.5","description":"","creator":{"login":"zero-24","id":2596554,"avatar_url":"https://avatars.githubusercontent.com/u/2596554?v=3","gravatar_id":"","url":"https://api.github.com/users/zero-24","html_url":"https://github.com/zero-24","followers_url":"https://api.github.com/users/zero-24/followers","following_url":"https://api.github.com/users/zero-24/following{/other_user}","gists_url":"https://api.github.com/users/zero-24/gists{/gist_id}","starred_url":"https://api.github.com/users/zero-24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zero-24/subscriptions","organizations_url":"https://api.github.com/users/zero-24/orgs","repos_url":"https://api.github.com/users/zero-24/repos","events_url":"https://api.github.com/users/zero-24/events{/privacy}","received_events_url":"https://api.github.com/users/zero-24/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":95,"state":"open","created_at":"2015-08-24T14:19:20Z","updated_at":"2015-10-20T15:35:07Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-02-13T18:28:32Z","updated_at":"2015-10-20T15:35:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/6082","html_url":"https://github.com/joomla/joomla-cms/pull/6082","diff_url":"https://github.com/joomla/joomla-cms/pull/6082.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/6082.patch"},"body":"2nd error fix: removed the duplicated field \"a.node\" from the select list\r\nas reported #6054 2º Error: Delete 'a.note', because have 2 in \"SELECT\" and this can provoke a crash in MSSQL.\r\n\r\n\r\n\r\n-----\r\n#### Steps to reproduce the issue\r\nGo to: /index.php?searchword=tag&ordering=newest&searchphrase=all&option=com_search\r\n\r\n#### Expected result\r\nSearch Results.\r\n\r\n#### Actual result\r\n\r\n#### 1st error\r\n[Microsoft][SQL Server Native Client 11.0][SQL Server] Column 'yawcx_contact_details.name' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. SQL=SELECT * FROM ( SELECT a.name AS title, '' AS created, a.con_position, a.misc, CASE WHEN DATALENGTH(a.alias) != 0 THEN (CAST(a.id as NVARCHAR(10))+':'+a.alias) ELSE CAST(a.id as NVARCHAR(10)) END as slug, CASE WHEN DATALENGTH(c.alias) != 0 THEN (CAST(c.id as NVARCHAR(10))+':'+c.alias) ELSE CAST(c.id as NVARCHAR(10)) END as catslug, (a.name+','+a.con_position+','+a.misc) AS text,('Contacts'+' / '+c.title) AS section,'2' AS browsernav , ROW_NUMBER() OVER (ORDER BY a.name DESC) AS RowNumber FROM yawcx_contact_details AS a INNER JOIN yawcx_categories AS c ON c.id = a.catid WHERE (a.name LIKE '%tag%' OR a.misc LIKE '%tag%' OR a.con_position LIKE '%tag%' OR a.address LIKE '%tag%' OR a.suburb LIKE '%tag%' OR a.state LIKE '%tag%' OR a.country LIKE '%tag%' OR a.postcode LIKE '%tag%' OR a.telephone LIKE '%tag%' OR a.fax LIKE '%tag%') AND a.published IN (1,2) AND c.published=1 AND a.access IN (1,1,2) AND c.access IN (1,1,2) GROUP BY a.id, a.con_position, a.misc, c.alias, c.id ) _myResults WHERE RowNumber BETWEEN 1 AND 50\r\n\r\n#### 2nd error\r\n[Microsoft][SQL Server Native Client 11.0][SQL Server]The column 'note' was specified multiple times for '_myResults'. SQL=SELECT * FROM ( SELECT a.id, a.title, a.alias, a.note, a.published, a.access, a.checked_out, a.checked_out_time, a.created_user_id, a.path, a.parent_id, a.level, a.lft, a.rgt, a.language, a.created_time AS created, a.note, a.description, CASE WHEN DATALENGTH(a.alias) != 0 THEN (CAST(a.id as NVARCHAR(10))+':'+a.alias) ELSE CAST(a.id as NVARCHAR(10)) END as slug , ROW_NUMBER() OVER (ORDER BY a.created_time DESC) AS RowNumber FROM yawcx_tags AS a WHERE a.alias <> 'root' AND (a.title LIKE '%tag%' OR a.alias LIKE '%tag%') AND a.access IN (1,1,2) ) _myResults WHERE RowNumber BETWEEN 1 AND 50\r\n\r\n#### System information (as much as possible)\r\nIIS\r\nMSSQL\r\nJoomla 3.3.6\r\n\r\n#### Additional comments\r\n1º Error:  group clause a.name, a.alias, c.title because GROUP BY is diferent in MySQL.\r\n(/plugin/search/contacts/contacts.php)\r\n2º Error: Duplicate 'a.note',  2 times in \"SELECT\" and this can provoke a crash in MSSQL.\r\n(/plugin/search/tags/tags.php)\r\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/149605276","html_url":"https://github.com/joomla/joomla-cms/pull/6082#issuecomment-149605276","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6082","id":149605276,"user":{"login":"zero-24","id":2596554,"avatar_url":"https://avatars.githubusercontent.com/u/2596554?v=3","gravatar_id":"","url":"https://api.github.com/users/zero-24","html_url":"https://github.com/zero-24","followers_url":"https://api.github.com/users/zero-24/followers","following_url":"https://api.github.com/users/zero-24/following{/other_user}","gists_url":"https://api.github.com/users/zero-24/gists{/gist_id}","starred_url":"https://api.github.com/users/zero-24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zero-24/subscriptions","organizations_url":"https://api.github.com/users/zero-24/orgs","repos_url":"https://api.github.com/users/zero-24/repos","events_url":"https://api.github.com/users/zero-24/events{/privacy}","received_events_url":"https://api.github.com/users/zero-24/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T15:35:07Z","updated_at":"2015-10-20T15:35:07Z","body":"RTC. Sorry for taking so long to RTC :(<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/6082\">issues.joomla.org/joomla-cms/6082</a>.</sub>"}}