// For subsequent pages when searching by id, subtract the "extra" first page
elseif ($searchById && $this->page > 1) {
$this->page -= 1;
+ // Record with that id was already returned on page one so exclude it from subsequent pages
+ $this->savedSearch['api_params']['where'][] = [$primaryKeys[0], '!=', $this->input];
}
// If first line uses a rewrite, search on those fields too
if (!$initialSearchById && !empty($this->display['settings']['columns'][0]['rewrite'])) {
$cid = $contacts[11]['id'];
Contact::save(FALSE)
+ ->addRecord(['id' => $contacts[11]['id'], 'last_name' => "Aaaac$cid"])
->addRecord(['id' => $contacts[0]['id'], 'last_name' => "Aaaac$cid"])
->addRecord(['id' => $contacts[14]['id'], 'last_name' => "Aaaab$cid"])
->addRecord(['id' => $contacts[6]['id'], 'last_name' => "Aaaaa$cid"])