Strange issue with CCK field

Events happening in the community are now at Drupal community events on www.drupal.org.
pmackay's picture

I have a field definition in a pattern:

- tag: field
type: event
field_name: location
label: Location
option: text
widget_type: text_textfield

It fails to import and returns with this error:

* Add new field: you need to select a field type.
* Add new field: you need to select a widget.
* Above error(s) occured while executing action #1 (CCK: Add Field or Group) in Events pattern. Error location(s) are: _add_new_field->type, _add_new_field->widget_type

I have tried with name rather than field_name and widget rather than widget_type too.

Any suggestions as to the cause of this are very welcome!

Thanks

Comments

I've fixed this..

pmackay's picture

A rather obvious solution to a non-obvious error message through serendipitous discovery..

Glad you fixed it. What was

vaish's picture

Glad you fixed it. What was the problem? Btw, "name" and "widget" should be used instead of the longer versions you specified.

CCK fields

pmackay's picture

Were not enabled - I ran the pattern on a fresh site that I was trying to configure just with patterns, and had missed enabling all the individual cck fields. The error messages were just not making that connection initially....

Error you got is coming from

vaish's picture

Error you got is coming from CCK module. It's not very descriptive because neither patterns nor CCK module can really know which module needs to be enabled in order to create certain type of CCK field.

Good practice is to always make sure that you define all the modules required by your pattern in "modules" section of pattern file. That's the only way you can be sure your pattern will always run on a fresh Drupal site. Alternatively, if some of the required modules happens not to be available, patterns will report meaningful error message listing all the missing modules.

Patterns

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: