CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • table "civicrm_prevnext_cache" is not updated with custom search
Pages: [1]

Author Topic: table "civicrm_prevnext_cache" is not updated with custom search  (Read 531 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
table "civicrm_prevnext_cache" is not updated with custom search
February 06, 2015, 07:01:23 pm
I have a custom search that returns more than one page worth of results. However, the table "civicrm_prevnext_cache" remains empty.   What in the custom search normally triggers appropriate records getting inserted into the "civicrm_prevnext_cache"?   

Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: table "civicrm_prevnext_cache" is not updated with custom search
February 07, 2015, 05:36:37 am
IIRC I don't think that's been implemented for anything but advanced search.
Try asking your question on the new CiviCRM help site.

manikandan.civicrm

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • Cool in Coding
    • Linux, Apache, MySQL, PHP
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.34
  • MySQL version: MySQL 5.5.38
  • PHP version: PHP 5.5.15
Re: table "civicrm_prevnext_cache" is not updated with custom search
March 14, 2015, 12:20:14 pm
You have to check couple of things. There are

1) Your custom search class should extends with CRM_Contact_Form_Search_Custom

2) Your custom search class should have contactIDs method.
 
Code: [Select]
function contactIDs($offset = 0, $rowcount = 0, $sort = NULL) {
    return $this->all($offset, $rowcount, $sort, FALSE, TRUE);
  }

3) Check that $this->all() method should return the sql query like

Code: [Select]
SELECT contact_a.id as contact_id FROM
Query should be select only contact id field from table.


For additional info:
civicrm_prevnext_cache table insertion is code is on below file and method. Please check.

 civicrm/CRM/Contact/Selector.php

Code: [Select]
function fillupPrevNextCache($sort, $cacheKey, $start = 0, $end = 500) {
...
}


Thanks :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • table "civicrm_prevnext_cache" is not updated with custom search

This forum was archived on 2017-11-26.