Had to run a quick test on something so I installed a D7 with the minimal modules install option. Came across a unique bug.

With minimal install and node reference checked, I get these errors:

    * Notice: Undefined index: label in field_ui_widget_type_options() (line 1418 of /Applications/MAMP/htdocs/drupal7/modules/field_ui/field_ui.admin.inc).
    * Notice: Undefined index: label in field_ui_widget_type_options() (line 1418 of /Applications/MAMP/htdocs/drupal7/modules/field_ui/field_ui.admin.inc).

When selecting the Node Reference field type, the autocomplete widget option appears but the other two widgets options (select list and check boxes/radio buttons) appear as Null.

The errors go away when I enable the D7 core 'Options' module (which is not enabled by default in the minimal modules install), these errors go away and the widget options are available. The same error also occurs when I enable user_reference without the options module.

So the question is, does node_reference and user_reference need the options module as a dependency? Or is it better to disable the other widgets if the option modules is not installed?

CommentFileSizeAuthor
#8 1037282_references_files.patch1.07 KBandypost

Comments

jcarlson34’s picture

Furthermore, while it can be assumed that people will have the 'Field' and 'Field SQL storage' core modules enabled (since Drupal installs them by default in both standard and minimal installs), should those be listed as dependencies as well?

Seems silly to think someone might disable Field and Field SQL storage and then later enable References but who knows?

yched’s picture

Priority: Major » Normal

We do need a dependency on 'options' and 'field' modules.
The module should work if the site disabled field_sql_storage and uses an alternate storage module, though.

yched’s picture

Status: Active » Fixed

Committed a fix.

jcarlson34’s picture

Awesome. Thanks for your help and efforts yched.

Didn't know there was alternative storage methods tho. I guess you can learn something new every day on this site!

yched’s picture

you can learn something new *twice a minute* on this site ;-)

andypost’s picture

Status: Fixed » Reviewed & tested by the community

I think @files section of .info should hold only .test file because this part points to files that fill classRegistry of D7 Core

But probably this could be empty al all because .test classes are not used in common workflow... maybe we need separate issue?

yched’s picture

Status: Reviewed & tested by the community » Fixed

@andypost : not sure what you set to RTBC ?

The .info file will need test files too, right. We'll add them when there are actual tests in the files ;-)

andypost’s picture

Status: Fixed » Needs review
StatusFileSize
new1.07 KB

I mean needs review... so let's remove .module files from .info because the module does not declare any interfaces or classes

more http://drupal.org/update/modules/6/7#registry and http://drupal.org/node/542202

similar issue been commited to views #1006088: Remove curft from .info file

yched’s picture

Status: Needs review » Reviewed & tested by the community

Sure, makes sense. I have to confess I didn't see this become officially recommended.

fgm’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks.

jcarlson34’s picture

Thanks to all for the fix.

@yched You're totally right btw... you can learn something every minute here.

Status: Fixed » Closed (fixed)

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