Answers.Body: <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-02T07:24:18.680Z
Answers.Text: Thank you... I opened an issue for CiviCRM: https://lab.civicrm.org/dev/core/-/issues/3771
Answers.UserDisplayName: Tobias Krause
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-19T13:12:15.740Z
Answers.Text: Now fixed in 5.54.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-01T15:48:07.517Z
Answers.LastActivityDate: 2022-08-01T15:48:07.517Z
Answers.UserDisplayName: Demerit
Body: <p>The PHP warning appears everytime when a user enters &quot;Manage Groups&quot; (/civicrm/group).</p>
  <p>The full warning:</p>
  <pre><code>Warning: Undefined array key &quot;rows&quot; in include() (line 6 of sites/default/files/civicrm/templates_c/en_US/%%7A/7A2/7A24E297%%Search.tpl.php).
  </code></pre>
  <p>The line looks like.</p>
  <pre><code>&lt;div class=&quot;crm-accordion-wrapper crm-search_builder-accordion &lt;?php if ($this-&gt;_tpl_vars['rows'] &amp;&amp; empty ( $this-&gt;_tpl_vars['showSearchForm'] )): ?&gt;collapsed&lt;?php endif; ?&gt;&quot;&gt;
  </code></pre>
  <p>and this file is compiled from CRM/Group/Form/Search.tpl where this line looks like</p>
  <pre><code>&lt;div class=&quot;crm-accordion-wrapper crm-search_builder-accordion {if $rows and empty($showSearchForm)}collapsed{/if}&quot;&gt;
  </code></pre>
  <p>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?</p>
  
Tags: <groups><search><templates>
Title: Undefined array key "rows" in Search.tpl.php when entering "Manage Groups"
ThreadText: # Undefined array key "rows" in Search.tpl.php when entering "Manage Groups"
  
  (Asked by: username_0 on 2022-08-01)
  
  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.
  
  
  and this file is compiled from CRM/Group/Form/Search.tpl where this line looks like
  
  
  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?
  
  **Tags:** groups, search, templates
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-08-01. Score: 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.
  
  > **Comments:**
  > **username_0**: Thank you... I opened an issue for CiviCRM: https://lab.civicrm.org/dev/core/-/issues/3771  
  > **username_1**: Now fixed in 5.54.  
  
  ---
  
  