Problem

I had a blank page, sometimes (clearing cache solved the problem for some minutes but error reappaears after), when creating a node containing several nodereference_explorer fields. I looked in php log and saw this error:

PHP Fatal error: Call to undefined function theme_link() in nodereference_explorer/plugins/content/link/nodereference_explorer_plugin_content_link.inc on line 73

Proposed resolution

I have solved it with the joined patch, but not sure it is the good way to fix it...
In file plugins/content/link/nodereference_explorer_plugin_content_link.inc, I have added code below just after line 9: module_load_include('inc', NODE_REFERENCE_EXPLORER_MODULE_NAME, 'plugins/content/nodereference_explorer_plugin_content');

// Fix php fatal error "Call to undefined function theme_link()" called in function theme_nodereference_explorer
// happening sometimes : clear cache and it's ok,
// try later without clearing cache and Fatal error
if ( !function_exists('theme_link') ) {
  module_load_include('inc', 'link', 'link.theme');
}

Details :

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dboulet’s picture

I think that the proper fix would be to replace the call to theme_link() with theme('link').

dboulet’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
Priority: Normal » Critical
Status: Active » Needs review
FileSize
1002 bytes

This seems to fix the problem for me.

SylvainM’s picture

Thanks, this patch solves the issue for me.

gnindl’s picture

Status: Needs review » Fixed

Thanks, patch from comment #2 committed.

Status: Fixed » Closed (fixed)

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