We recently updated php to php7.0 on our Ubuntu 16 server where we're running Drupal 7.67, MySQL 5.7, and biblio to 7.x-1.1 (and subsequently to 1.2). In both v1.1 and 1.2 we would get the following error on node save for biblio when creating a reference from both bibtex and pubmed id:

Error: Call to undefined function search_index() in _node_index_node() (line 2804 of /modules/node/node.module).

I couldn't make any sense out of this at first, but I decided to enable the core search module (which wasn't enabled when we were getting the error) since a search function and the node.module were listed in the error message. To my surprise, enabling the core search module made the error go away and node save worked for biblio again. I checked biblio's module dependencies and search isn't listed. Any idea why this would be the case?

I hope this bug report is useful in some way. Please let me know if I can help by providing more information or by testing patches.

Tom

Comments

thoogend created an issue. See original summary.

liam morland’s picture

Title: php error on node save when core search module is not enabled » Undefined function search_index() on node save when core search module is not enabled
Version: 7.x-1.2-rc1 » 7.x-1.x-dev

Please provide steps to reproduce the problem.

thoogend’s picture

With the core search module disabled, adding a new biblio node or updating an existing node would lead to the error. The node would be created and updated, but an error would be generated. So it looked to the content editor like nothing had been saved. Looking in /admin/content, the new or updated biblio node was present and otherwise seemed fine. Let me know if you need any further details.

liam morland’s picture

Status: Active » Fixed

On admin/config/content/biblio, uncheck "Re-/Index a biblio node when creating or updating." You will have to temporarily re-enable search module to be able to do this. Or run drush vdel biblio_index. Or update to the latest development version.

thoogend’s picture

Thanks for getting back to me on this. I can confirm this works with our site. With the core search module enabled, I went to /admin/config/content/biblio > default References tab > Search vertical tab and unchecked "Re-/Index a biblio node when creating or updating." I then disabled the core search module and was able to edit biblio nodes without the error. I then did a drush pm-uninstall search and was still able to save changes to biblio nodes. I then looked for the "Re-/Index a biblio node..." option on the Biblio settings page and it was grayed out. So that option must have been enabled back before the search module was disabled. Thanks again!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.