The PHP warning appears everytime when a user enters "Manage Groups" (/civicrm/group).

The full warning:

Warning: Undefined array key "rows" in include() (line 6 of sites/default/files/civicrm/templates_c/en_US/%%7A/7A2/7A24E297%%Search.tpl.php).

The line looks like.

<div class="crm-accordion-wrapper crm-search_builder-accordion <?php if ($this->_tpl_vars['rows'] && empty ( $this->_tpl_vars['showSearchForm'] )): ?>collapsed<?php endif; ?>">

and this file is compiled from CRM/Group/Form/Search.tpl where this line looks like

<div class="crm-accordion-wrapper crm-search_builder-accordion {if $rows and empty($showSearchForm)}collapsed{/if}">

I did not learn much about the rendering in CiviCRM yet so I wonder what changed and what is going on here. Could somebody give me a hint?

1 Answer 1


It's a bug and I think it's left over from before this form was ajax-ified. It doesn't cause any functional problem, but the variable should probably be removed. The idea I think was that after submitting the search form, if it found any results it would collapse the search criteria, but this page doesn't work like a normal search form anymore.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.