I've installed CCK in a brand new installation of the 4.7.1 code, patched the content_module.inc file to fix the array problem, and now I can create a content type, but even though I have enabled the text.module, I'm getting this error when I try to set some fields for the module:

"No field modules are enabled. You need to enable one, such as text.module, before you can add new fields."

Any ideas? Have I missed something in the installation?

-j

Comments

mopi’s picture

I have the same problem

dman’s picture

Title: Modules are not enabled » Modules are not enabled (text content types not available)

Ditto.
Brand new (4.7.2 stable) install with nothing else enabled.
content.module fresh from CVS
- enabled content.
- went to define content type, set title OK, but was told to enable text.module.
- Did so (checked module IS enabled on admin/modules)
- Still can't add a text field.

... investigating now.

dman’s picture

It appears that content_clear_type_cache() was not being called often enough in the process I described above.
Deleting my (empty) content type and starting again did trigger recognition of the text.module.

Perhaps the content_clear_type_cache() should be double-checked in the _content_admin_field_add() function or thereabouts before giving this erroneous message.

EG:

Index: content_admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/content_admin.inc,v
retrieving revision 1.16
diff -u -r1.16 content_admin.inc
--- content_admin.inc	12 Jun 2006 19:36:54 -0000	1.16
+++ content_admin.inc	13 Jun 2006 14:32:25 -0000
@@ -260,6 +260,7 @@
  */
 function _content_admin_field_add($type_name) {
   $type = content_types($type_name);
+  content_clear_type_cache();
   $field_types = _content_field_types();
   $fields = content_fields();
   $widget_types = _content_widget_types();
karens’s picture

Status: Active » Fixed

I think this problem has been fixed since this issue was posted.

Anonymous’s picture

Status: Fixed » Closed (fixed)