4 users online. Create an account or sign in to join them.Users

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

When grouping a data source by checkbox values, Symphony actually just groups all entries in one element, see here. There is an undefined variable $handle used in the field’s groupRecords function which breaks things. Changing $handle to $value fixes 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;
}       

Fixed here. Just wait for pull.

This issue is closed.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details