4 users online. Create an account or sign in to join them.Users
[2.0.7] Grouping by Checkboxes not working
A for , submitted by Nils on 03 March 2010
Announcement
Symphony's issue tracker has been moved to Github.
Issues are displayed here for reference only and cannot be created or edited.
Browse
Closed#244: [2.0.7] Grouping by Checkboxes not working
Fixed here. Just wait for pull.
This issue is closed.
When grouping a data source by checkbox values, Symphony actually just groups all entries in one element, see here. There is an undefined variable
$handleused in the field’sgroupRecordsfunction which breaks things. Changing$handleto$valuefixes the issue:function groupRecords($records){ if(!is_array($records) || empty($records)) return; $groups = array($this->get('element_name') => array()); foreach($records as $r){ $data = $r->getData($this->get('id')); $value = $data['value']; if(!isset($groups[$this->get('element_name')][$value])){ $groups[$this->get('element_name')][$value] = array( 'attr' => array( 'value' => $value ), 'records' => array(), 'groups' => array() ); } $groups[$this->get('element_name')][$value]['records'][] = $r; } return $groups; }