I'm getting this error after installing Nodereference Explorer 1.1-rc3 and trying to create a CCK field that is of type Node Reference - Explorer.

Fatal error: Class 'nodereference_explorer_plugin_content_' not found in sites\all\modules\nodereference_explorer\nodereference_explorer.module on line 209

CommentFileSizeAuthor
#6 803358-fatalerror.patch681 bytesnetsensei
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sloane DellOrto’s picture

I'm getting the same error.

Fatal error: Class 'nodereference_explorer_plugin_content_' not found in /www/www/current/sites/all/modules/nodereference_explorer/nodereference_explorer.module on line 209

Anytime I update a feature or try to just add a field to a content type. I can choose "select list" as the widget, and change it back later, and then it seems to work OK.

rcross’s picture

+1

bdhowell’s picture

+1

gnindl’s picture

Version: 6.x-1.1-rc3 » 6.x-1.x-dev
Assigned: Unassigned » gnindl
Status: Active » Fixed

Apparently the nodereference_explorer_widget_settings_save() function is invoked on field creation. A valid field cannot be found, which is not necessary at this point. Therefore we can simply skip this any routine here. See current dev snapshot.

Status: Fixed » Closed (fixed)

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

netsensei’s picture

Status: Closed (fixed) » Active
FileSize
681 bytes

I'm going to reopen this one.

Just installed version 1.2 on a site. I had a few existing nodereferences where I wanted to use the widget. Upon changing the widget to 'explorer', I got this error.

You try to fetch the field object with content_fields() through it's field_name in _nodereference_explorer_widget_settings_get_content_field(). When the second method - fetching through the error element - is being used, things can go wrong.

My field has a long name: field_publ_contactpersoondistributeur. The error element returns this entire fieldname. Turns out that the keys in content_fields() array get truncated to 32 characters. So, content_fields will return NULL although the field exists.

Patch attached.

gnindl’s picture

Status: Active » Fixed

Thanks netsensei, your patch has been committed:

http://drupalcode.org/project/nodereference_explorer.git/commit/e162080

Status: Fixed » Closed (fixed)

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