Body: <p>CiviCRM 5.66.0 / WordPress / PHP 8.1.24</p>
  <p>There is a smart group with ~870 contacts.  A user goes to view the contacts from the contacts shortcut on the Manage Groups page.  When viewing the contacts at a default of 100 rows per page, everything works smoothly until you reach contact 500 (the page displaying contacts 401-500).  When trying to view the next page, instead of showing the contacts, Civi displays a message that &quot;[Group_name] has no contacts which match your search criteria. You can add contacts here.&quot;</p>
  <p>Here is where the plot thickens:</p>
  <p>As a workaround, users can edit the rows per page option to 1000 and get all of the contacts to display just fine --- the issue only arises when trying to view past contact 500 in the default 100 contacts/page pagination situation.</p>
  <p>In fact, once the rows per page option is edited in the bottom right to <em>any</em> value, pagination works fine.  If the option is set to 50, then you can page through all of the contacts.  If the option is set to 300, then you can page through all of the contacts.  If you change the option back to 100 after changing to something else, then the pagination works past page 5!  But I can reliably reproduce the issue when the default pagination of 100 rows per page is not changed and you try to page past 500 contacts.</p>
  <p>Troubleshooting steps taken:</p>
  <ul>
  <li>Tried other groups (the issue is still there for other groups)</li>
  <li>increased PHP and WordPress memory limit to 256MB (from 128MB)</li>
  <li>cleared CiviCRM caches</li>
  <li>inspected logs</li>
  <li>changed the PrevNext cache (on the Misc (Undelete, PDFs, Limits, Logging, etc.) screen) option to SQL instead of Redis</li>
  </ul>
  <p>Any ideas?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-16T04:19:02.667Z
Comments.Text: Have you reproduced this on dmaster or wpmaster (dmaster.demo.civicrm.org or wpmaster.demo.civicrm.org)? I would not be surprised to see weird things in this area, having observed similar weirdness myself in some cases, though I don't think this exact issue.
Comments.UserDisplayName: Lars SG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-17T15:46:44.583Z
Comments.Text: I know it doesn't fix the problem if the preference is 100 but to avoid confusion it may be worth just setting the default to something not 100 in the search preference settings?
Comments.UserDisplayName: RebeccaTregenna
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-18T16:15:33.877Z
Comments.Text: Yes, I just reproduced this issue on wpmaster.demo.civicrm.org.
  
  Steps to reproduce:
  - created csv with 818 dummy contacts (Test1, Test2, etc.) and imported them adding a tag "ImportTest"
  - created a smart group that captures all contacts tagged "importTest"
  - changed the default rows for a search to 100 
  - verified the same behavior is happening.
Comments.UserDisplayName: user15932
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-20T18:50:30.230Z
Comments.Text: Sounds like a bug then, you should report it at https://lab.civicrm.org/groups/dev/-/issues/
Comments.UserDisplayName: Lars SG
Tags: <search><smartgroups>
Title: Problem with Smart Group display pagination past 500 contacts
ThreadText: # Problem with Smart Group display pagination past 500 contacts
  
  (Asked by: username_0 on 2023-10-15)
  
  CiviCRM 5.66.0 / WordPress / PHP 8.1.24
  
  There is a smart group with ~870 contacts. A user goes to view the contacts from the contacts shortcut on the Manage Groups page. When viewing the contacts at a default of 100 rows per page, everything works smoothly until you reach contact 500 (the page displaying contacts 401-500). When trying to view the next page, instead of showing the contacts, Civi displays a message that "[Group\_name] has no contacts which match your search criteria. You can add contacts here."
  
  Here is where the plot thickens:
  
  As a workaround, users can edit the rows per page option to 1000 and get all of the contacts to display just fine --- the issue only arises when trying to view past contact 500 in the default 100 contacts/page pagination situation.
  
  In fact, once the rows per page option is edited in the bottom right to *any* value, pagination works fine. If the option is set to 50, then you can page through all of the contacts. If the option is set to 300, then you can page through all of the contacts. If you change the option back to 100 after changing to something else, then the pagination works past page 5! But I can reliably reproduce the issue when the default pagination of 100 rows per page is not changed and you try to page past 500 contacts.
  
  Troubleshooting steps taken:
  
  * Tried other groups (the issue is still there for other groups)
  * increased PHP and WordPress memory limit to 256MB (from 128MB)
  * cleared CiviCRM caches
  * inspected logs
  * changed the PrevNext cache (on the Misc (Undelete, PDFs, Limits, Logging, etc.) screen) option to SQL instead of Redis
  
  Any ideas?
  
  **Tags:** search, smartgroups
  
  > **Comments:**
  > **username_1**: Have you reproduced this on dmaster or wpmaster (dmaster.demo.civicrm.org or wpmaster.demo.civicrm.org)? I would not be surprised to see weird things in this area, having observed similar weirdness myself in some cases, though I don't think this exact issue.  
  > **username_2**: I know it doesn't fix the problem if the preference is 100 but to avoid confusion it may be worth just setting the default to something not 100 in the search preference settings?  
  > **username_0**: Yes, I just reproduced this issue on wpmaster.demo.civicrm.org.  Steps to reproduce: - created csv with 818 dummy contacts (Test1, Test2, etc.) and imported them adding a tag "ImportTest" - created a smart group that captures all contacts tagged "importTest" - changed the default rows for a search to 100  - verified the same behavior is happening.  
  > **username_1**: Sounds like a bug then, you should report it at https://lab.civicrm.org/groups/dev/-/issues/  
  
  ---
  
  ## 0 answers
  
  