Can't use site search function - it returns this error
Fatal error: Call to undefined function search_query_extract() in /var/www/.../sites/all/modules/creativecommons/creativecommons.module on line 1513

Comments

Daguntzi’s picture

Version: 7.x-1.x-dev » 7.x-1.0-alpha2

I get the same error with alpha2

Anonymous’s picture

I am seeing this error with alpha2 also. The fatal error (and white screen) occurs because the Drupal 6 functions search_query_extract() and search_query_insert() are used within creativecommons.module.

The equivalent Drupal 7 functions are search_expression_extract() and search_expression_insert(). In my copy of the module I replaced each occurrence of the D6 functions with their D7 equivalents and now I see search results but I'm seeing additional errors. I'm not exactly an expert on the Drupal 7 forms API but I will keep trying to figure it out - maybe somebody could provide guidance?

kreynen’s picture

Status: Active » Needs work

@synchlayer and I will be working on the Creative Commons module at the Community Media Drupal Camp. This issue is at the top of the list.

Anonymous’s picture

Status: Needs work » Active

Thanks, kreynen and synchlayer, I appreciate your work on this!

kreynen’s picture

Status: Active » Needs work

I made the changes @Steve_Gregory_Colorado suggested, but there are still issues in the search. What's weird is hook_search doesn't exist in D7, so that needs to be changed too.

I did change the variable default so that it's possible to disable search and work around the error. I'm going to work on the View handler issues and come back to this.

Anonymous’s picture

I understand that in Drupal 6 there was a single hook_search function with a parameter $op to distinguish operations, but Drupal 7 has split this functionality into 8 different hook_search_xxx functions.