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!

1 Answer 1


It's a change on 4.6.x and you need to implement a new method "buildTaskList"


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.