veda-consulting-company / uk.co.vedaconsulting.mailchimp

Other
22 stars 43 forks source link

(<=4.6) Extension breaks filtering on Manage Groups screen #224

Closed xurizaemon closed 7 years ago

xurizaemon commented 8 years ago

When this module is enabled, it inserts an additional column to the Manage Groups screen.

The CiviCRM DataTables code from 4.6 does not handle this well. Attempting to filter groups on this screen (eg by entering text in the "name" field then clicking "Search") will lead to a JS error and no filtering:

Uncaught TypeError: Cannot read property 'mData' of undefined

This is because before 4.7 the DataTables attributes on this page are added inline in CiviCRM's Group.tpl 👎 ... this also makes it unpleasant to try and fix! Instead, a simple workaround is to comment out CRM.$(mailchimpGroupsPageAlter); in line 28 of templates/CRM/Group/Page/Group.extra.tpl for sites running 4.6 or below; this disables the addition of the "Mailchimp Sync" column.

The DataTables code was made more robust in 4.7 series (CRM-16353) and this is no longer an issue. Thanks josephlacey & colemanw 👍

deepak-srivastava commented 7 years ago

Tested this for v2.x release, and seems to work. Please re-open if the issue still seem to exist with latest v2.x. Thanks.

agileware commented 7 years ago

Just reporting that we've seen this exact same problem and the fix as detailed by @xurizaemon works in CiviCRM 4.6.31. Thanks @xurizaemon you're a legend!