CMS MADE SIMPLE FORGE

CGClientTickets

 

[#11065] After install, admin section of module does not work

avatar
Created By: Jurrie Overgoor (jurrie)
Date Submitted: Wed Jun 22 05:16:12 -0400 2016

Assigned To: Robert Campbell (calguy1000)
Version: 1.1.4
CMSMS Version: 2.1.3
Severity: Minor
Resolution: Works For Me
State: Open
Summary:
After install, admin section of module does not work
Detailed Description:
After installing (with the patch in bug #10371 -
http://dev.cmsmadesimple.org/bug/view/10371), the admin section does not work. A
page with the following text is displayed:

Tickets
Settings
My Tickets List Templates
Manage Tickets List Templates
New Ticket Form Templates
View Ticket Report Templates
Prototype Templates
SELECT SQL_CALC_FOUND_ROWS T.id, T.owner, T.alert_group, T.e_key1, T.e_key2,
T.e_key3, T.status, T.priority, T.created, COUNT(M.id) AS nmsgs, M.subject,
MAX(M.modified) AS modified_date, S.n_unread FROM cms_mod_cgct_tickets T LEFT
JOIN cms_mod_cgct_msgs M ON T.id = M.ticket_id LEFT JOIN (SELECT
ticket_id,COUNT(id) AS n_unread FROM cms_mod_cgct_msgs WHERE dest < 0 AND
viewed_by IS NULL GROUP BY ticket_id) S ON T.id = S.ticket_id GROUP BY T.id
ORDER BY modified_date DESC LIMIT 0, 100 Expression #11 of SELECT list is not in
GROUP BY clause and contains nonaggregated column 'cmsms-2.1.3.M.subject' which
is not functionally dependent on columns in GROUP BY clause; this is
incompatible with sql_mode=only_full_group_by

The reason is that, in the SQL query, M.subject is selected while it's not in
the GROUP BY clause.

Solution is to change line 43 in class.TicketListResultest.php. "M.subject"
should be replaced with "( select subject from '.CGST_MSGS_TABLE.' where
ticket_id = T.id order by sent desc limit 1 ) as subject"

The complete line then becomes:

$cols =
explode(',','T.id,T.owner,T.alert_group,T.e_key1,T.e_key2,T.e_key3,T.status,T.priority,T.created,COUNT(M.id)
AS nmsgs, ( select subject from '.CGST_MSGS_TABLE.' where ticket_id = T.id order
by sent desc limit 1 ) as subject, MAX(M.modified) AS modified_date');


History

Comments
avatar
Date: 2016-06-25 13:24
Posted By: Robert Campbell (calguy1000)

just tested, works fine.
perhaps disable that mysql setting.
      
avatar
Date: 2016-06-25 13:56
Posted By: Robert Campbell (calguy1000)

by doing my research this bug is caused by a new flag (on by default) in Mysql
5.7 which is distributed first and only at this time with Ubuntu 16.04.

At this time the best solution (because the same issue may popup up in other
locations) is to disable the appropriate flag in the mysql settings.

CMSMS is undoubtedly not the only package that this will effect.  and certainly
more than one third party module will also be effected.

Priority changed to 'minor' as this can be solved by changing the mysql
configuration.
      
Updates

Updated: 2016-06-25 13:56
severity_id: 1 => 3

Updated: 2016-06-25 13:24
resolution_id: => 11