So far everything works perfectly using the organic groups module. Even in views, aside from og_handler_filter_user_roles.
When trying to filter user roles the following error message is displayed, and it does not allow me to continue editing the view. I most likely have to delete the view from the database manually and then recreate it.
Is this bug by chance exclusive to MSSQL? Any help would be much appreciated. The complete error message is below:
PDOException: SQLSTATE[42000]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Column 'og_role.rid' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.: SELECT r.*, r.name AS _field_0 FROM {og_role} r GROUP BY r.name; Array ( ) in og_handler_filter_user_roles->get_value_options() (line 14 of C:\inetpub\wwwroot\sites\all\modules\og\includes\views\handlers\og_handler_filter_user_roles.inc).
Comment | File | Size | Author |
---|---|---|---|
#3 | i2097539.patch | 627 bytes | attiks |
|
Comments
Comment #1
NWOM CreditAttribution: NWOM commentedI fixed the issue by changing Line 13 in the og_handler_filter_user_roles.inc
From
->groupBy('r.name')
to
->groupBy('r.name')->groupBy('r.rid')->groupBy('r.gid')->groupBy('r.group_type')->groupBy('r.group_bundle')
Comment #2
mbnsorg CreditAttribution: mbnsorg commentedWe are also seeing this issue for MSSQL, although it is working okay on MySQL site.
Not sure if there is a difference between listing all the fields in the groupBy() or removing the groupBy() altogether. I am going to try removing it.
Comment #3
attiks CreditAttribution: attiks at Attiks commentedSee https://github.com/Gizra/og/pull/317
Comment #4
attiks CreditAttribution: attiks at Attiks commentedChanging to critical since it breaks the view when using something else than mysql