?
Referenced as Pull Request for: # 5929
avatar lmcculley
lmcculley
28 Jan 2015

JDatabaseQuery classes has a group by function that allows malformed SQL to be included in the GROUP BY statement. This leads to numerous problems with Joomla and MS SQL server, including looking at the included template manager.

The error I'm receiving when navigating to /administrator/index.php?option=com_templates and then clicking on protostar - Default to see the template details:

**Error**
[Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Column 'jos_menu.alias' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.SQL=SELECT a.id AS value, a.title AS text, a.alias, a.level, a.menutype, a.type, a.template_style_id, a.checked_out FROM jos_menu AS a LEFT JOIN [jos_menu] AS b ON a.lft > b.lft AND a.rgt < b.rgt WHERE a.published != -2 GROUP BY a.id, a.title, a.level, a.menutype, a.type, a.template_style_id, a.checked_out, a.lft ORDER BY a.lft ASC

According to this SO article, "In standard SQL (but not MySQL), when you use GROUP BY, you must list all the result columns that are not aggregates in the GROUP BY clause."

The current JDatabaseQuerySqlsrv class does not implement any sort of group function, and this needs to be remedied in order to consider any sort of MS SQL 'supported'.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar lmcculley lmcculley - open - 28 Jan 2015
avatar jissues-bot jissues-bot - change - 28 Jan 2015
Labels Added: ?
avatar brianteeman brianteeman - change - 28 Jan 2015
Category MS SQL
avatar brianteeman
brianteeman - comment - 28 Jan 2015

Can you confirm if this is a new error in 3.4beta or a pre-existing issue on 3.3.6


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5915.
avatar lmcculley
lmcculley - comment - 28 Jan 2015

It is a pre-existing issue on 3.3.6.

avatar brianteeman
brianteeman - comment - 28 Jan 2015

Thanks for clarifying

avatar brianteeman brianteeman - change - 28 Jan 2015
Priority Medium Urgent
avatar brianteeman
brianteeman - comment - 28 Jan 2015

Raising the priority as according to the report this makes joomla unusable on ms sql


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5915.
avatar brianteeman brianteeman - close - 30 Jan 2015
avatar brianteeman brianteeman - change - 30 Jan 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-01-30 09:57:55
Closed_By brianteeman
avatar brianteeman
brianteeman - comment - 30 Jan 2015

See #5929


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5915.
avatar brianteeman brianteeman - close - 30 Jan 2015
avatar lmcculley
lmcculley - comment - 30 Jan 2015

Why was this issue closed before the pull request was accepted?

avatar brianteeman
brianteeman - comment - 30 Jan 2015

Because we always close the Issue when a PR exists. That way the conversation and test results only take place in one place.

avatar lmcculley
lmcculley - comment - 30 Jan 2015

Thank you for the clarification.

Add a Comment

Login with GitHub to post a comment