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?
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 1037282_references_files.patch | 1.07 KB | andypost |
Comments
Comment #1
jcarlson34 commentedFurthermore, 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?
Comment #2
yched commentedWe 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.
Comment #3
yched commentedCommitted a fix.
Comment #4
jcarlson34 commentedAwesome. 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!
Comment #5
yched commentedyou can learn something new *twice a minute* on this site ;-)
Comment #6
andypostI 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?
Comment #7
yched commented@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 ;-)
Comment #8
andypostI 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
Comment #9
yched commentedSure, makes sense. I have to confess I didn't see this become officially recommended.
Comment #10
fgmCommitted, thanks.
Comment #11
jcarlson34 commentedThanks to all for the fix.
@yched You're totally right btw... you can learn something every minute here.