Answers.Body: <p>It's a change on 4.6.x and you need to implement a new method "buildTaskList"</p>
  
  <p><a href="http://wiki.civicrm.org/confluence/display/CRMDOC/API+changes#APIchanges-4.6.0:CRM_Contact_Form_Search_Interface-%3EbuildTaskList" rel="nofollow">http://wiki.civicrm.org/confluence/display/CRMDOC/API+changes#APIchanges-4.6.0:CRM_Contact_Form_Search_Interface-%3EbuildTaskList</a></p>
  
  <p>Classes which implement this interface must implement a new method called buildTaskList. This method is responsible for building the list of actions (e.g., Add to Group) that may be performed on set of search results. It differs from hook_civicrm_searchTasks in that the hook allows a developer to specify tasks by entity (e.g., Contact, Event, etc.) whereas buildTaskList provides the ability to target a specific form. The new method takes a CRM_Core_Form_Search object as an argument and should return an array. Dump CRM_Core_Form_Search->_taskList to learn about the format of the array. The array returned by buildTaskList will completely replace the task list.</p>
  
  <blockquote>
    <p>Aside from the community-maintained custom searches in
    CRM/Contact/Form/Search/Custom/, this change does not affect CiviCRM
    core. Custom searches which extend CRM_Contact_Form_Search_Custom_Base
    (as do those built on civix) will not be affected, as the method is
    implemented there.</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-11T18:16:21.200Z
Answers.LastActivityDate: 2016-01-11T18:16:21.200Z
Answers.UserDisplayName: Xavier
Body: <p>I created a custom search a while back. I copied an existing search and added the fields/sql I needed for the custom search. Things were working fine until the last civi upgrade. Now I am getting this error when trying to use that same custom search </p>
  
  <p>Fatal error: Class CRM_Contact_Form_Search_Custom_katiercase contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (CRM_Contact_Form_Search_Interface::buildTaskList) in /home/lifelight/www/www/civicrm_custom_php/CRM/Contact/Form/Search/Custom/katiercase.php on line 265</p>
  
  <p>Does anyone know if something changed that would have caused this? The php file is a little lengthy, but I can add it in if that would help. Any help on this would be greatly appreciated. Thanks!</p>
  
Tags: <custom-search>
Title: Custom Searches
ThreadText: # Custom Searches
  
  (Asked by: username_0 on 2016-01-11)
  
  I created a custom search a while back. I copied an existing search and added the fields/sql I needed for the custom search. Things were working fine until the last civi upgrade. Now I am getting this error when trying to use that same custom search
  
  Fatal error: Class CRM\_Contact\_Form\_Search\_Custom\_katiercase contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (CRM\_Contact\_Form\_Search\_Interface::buildTaskList) in /home/lifelight/www/www/civicrm\_custom\_php/CRM/Contact/Form/Search/Custom/katiercase.php on line 265
  
  Does anyone know if something changed that would have caused this? The php file is a little lengthy, but I can add it in if that would help. Any help on this would be greatly appreciated. Thanks!
  
  **Tags:** custom-search
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-01-11. Score: 2
  
  It's a change on 4.6.x and you need to implement a new method "buildTaskList"
  
  <http://wiki.civicrm.org/confluence/display/CRMDOC/API+changes#APIchanges-4.6.0:CRM_Contact_Form_Search_Interface-%3EbuildTaskList>
  
  Classes which implement this interface must implement a new method called buildTaskList. This method is responsible for building the list of actions (e.g., Add to Group) that may be performed on set of search results. It differs from hook\_civicrm\_searchTasks in that the hook allows a developer to specify tasks by entity (e.g., Contact, Event, etc.) whereas buildTaskList provides the ability to target a specific form. The new method takes a CRM\_Core\_Form\_Search object as an argument and should return an array. Dump CRM\_Core\_Form\_Search->\_taskList to learn about the format of the array. The array returned by buildTaskList will completely replace the task list.
  
  > Aside from the community-maintained custom searches in
  > CRM/Contact/Form/Search/Custom/, this change does not affect CiviCRM
  > core. Custom searches which extend CRM\_Contact\_Form\_Search\_Custom\_Base
  > (as do those built on civix) will not be affected, as the method is
  > implemented there.
  
  
  ---
  
  