I have custom types that I created with CCK.

Each of them includes custom fields.

I upgraded from CCK v6.x-2.0-rc9 to v6.x-2.1.

My version of core Drupal is v6.6.

I ran the upgrade.php script as instructed, and as I have in the past.

After running the upgrade script, I noticed that my CCK fields did not appear in the web pages of the site.

I examined the Content Types in the Admin module. All of the CCK fields that I added report the following error:

[Friendly Column Name] (machine column name) is an inactive Text field that uses a Text area (multiple rows) widget.

(I get variations on this error for each CCK field type and field)

And there is a general error (in red) at the top of the page:

This content type has inactive fields. Inactive fields are not included in lists of available fields until their modules are enabled.

All of the modules are enabled. And the upgrade.php script ran without errors.

How do I "re-activate" these inactive fields?

Comments

yched’s picture

Category: bug » support
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

did you enable text.module ?

brent960’s picture

Yes, text.module is enabled.

As are all of the other CCK-related modules that I make use of.

brent960’s picture

I seem to have found a solution, just from repetition.

I disabled all of the contributed and custom modules again.

And then I just now re-activated just CCK Content and CCK Text.

Everything looks okay. My CCK fields are enabled once again in the Content Type editing and management.

There must have been some kind of funky dependency at work here.

If I figure out what causes the dependency problem, I will post again.

brent960’s picture

It all seems to be fine now. All I did was disable all of the contributed modules again, and then re-enable them.

For some reason, they needed to be re-disabled after the upgrade.

I guess there's no real bug here.

But I've never had this problem before.

And it happened today on two different installations that I updated today.

KarenS’s picture

Exactly what process did you follow for disabling, updating, and re-enabling modules? I have run into this only if I didn't disable modules before the upgrade, or if I tried to enable all CCK modules at once without processing the upgrade of the content module first, which is why the upgrade instructions say not to do that.

The problem is caused if your contrib modules are enabled before the content module has been updated since the content module can't mark modules active until its updates have added the active column to the table.

It's possible there are still some upgrade paths that allow this to happen, but as you found out, the fix is to disable and then re-enable the modules after the content module has been updated so it can mark them active.

iancawthorne’s picture

I am struggling with this. I patched my CCK module first, then one by one patch the CCK reliant module I have including date, imagefield and embedded media field.

All my CCK reliant fields showed : "This content type has inactive fields. Inactive fields are not included in lists of available fields until their modules are enabled."

Disabling and enabling modules in various combinations seemed to make no difference for me.

I fixed the image field type by #17 here : http://drupal.org/node/296195

But I haven't managed to get my embedded media field or date fields working yet.

mustardman’s picture

I was freaking out about this and thinking I would have to try mess with fields directly in SQL. Then I found this thread. What solved the problem for me was disabling all the CCK modules and then re-enabling. Just the CCK modules was all that was required for me.

apaderno’s picture

Title: After Upgrade to Version 2.1, All CCK Custom Fields are Inactive » All CCK custom fields are inactive after upgrading
penteri’s picture

I get this inactive with FiveStar module.

I have this message in one of my content types:
"This content type has inactive fields. Inactive fields are not included in lists of available fields until their modules are enabled.
Stars (field_stars) is an inactive Fivestar Rating field that uses a Stars widget."

First I disenabled and then re-enabled CCK. Then I disenabled and then re-enabled Fivestar. Didn't helped, still inactive.

tsvenson’s picture

I have the same problem with CCK and Fivestar after updating Drupal 6.9 (the original install) to 6.10.

Fivestar is enabled and I have access to its configuration. I have tried disable and enable it as well as flushing caches.

After the core update I simply enabled all my contrib modules in one step.

tsvenson’s picture

Title: All CCK custom fields are inactive after upgrading » Still can get exting CCK Fivestars working after upgrade, can create new without problems.

I have now disabled all CCK modules, then re-enabled them in several turns starting with just content, then all modules that only depended on content (and other enabled modules), then more modules that had all dependencies enabled until I had enabled all modules again. It didn't help.

Then I noticed that I was able to create a new CCK Fivestar field, so I created a test field. It works just fine showing stars and everything. The problem though is that all my existing CCK Fivestar fields are still inactive.

I have no idea how to solve this problem!!!

tsvenson’s picture

apaderno’s picture

Title: Still can get exting CCK Fivestars working after upgrade, can create new without problems. » All CCK custom fields are inactive after upgrading
sunset_bill’s picture

Subscribing

I just upgraded to 6.x-2.1 as part of an experimental migration from D5 to D6 (on localhost, where I have backups and can blow everything up and restore within minutes as often as I like without anyone ever being the wiser), and I'm getting the same problem with custom CCK fields created by another module (Autocreate Node Reference), to wit:

Company Review Form (field_review_form) is an inactive Autocreate Node Reference field that uses a Select List widget.
Discuss this company at (field_og_group_node) is an inactive Autocreate Node Reference field that uses a Select List widget.

I have the same problem as others, I've got these two inactive fields ANR I can't get to, but I can add a new ANR field and it uses a Select List widget just like it's supposed to. I've tried disabling and re-enabling the ANR module alone and along with all of the CCK-related modules, but no good's come of that yet.

KarenS’s picture

Status: Postponed (maintainer needs more info) » Fixed

If disabling and re-enabling the field module doesn't work you may have a field module that isn't implementing all the hooks.

To everyone reporting this, this problem will not occur if you follow the update instructions on the project page, which say to disable all CCK modules before you update, then to enable just the core CCK module first and update it, and only enable the others after CCK is successfully updated.

The fields in question are missing information that was added during the update but got missed because they got updated before the Content module.

tsvenson’s picture

Sounds like the same problem as with Fivestar. Check http://drupal.org/node/327041#comment-1090802 and then find the rows for ANR in those tables.

sunset_bill’s picture

Thanks for the tip, but no luck. I still get the same warning even though both fields are active

mysql> select active from content_node_field where field_name in ('field_review_form', 'field_og_group_node');
+--------+
| active |
+--------+
|      1 | 
|      1 | 
+--------+

I'm still in trial mode on my D5->D6 upgrade, so will pay lots more attention to CCK on the next attempt and see if that avoids the problem. Otherwise I'll have to post a support request to see what required hook I missed in ANR that would cause this. :)

tsvenson’s picture

Did you check the "widget_active" column in the "content_node_field_instance" as well. It needs to be set to 1 as well.

If I understand the db structure correctly the content_node_field is a list of all the fields you have created, while content_node_field_instance contain the actual configuration for each content type you use them in.

KarenS’s picture

If you manually update the tables you have to be sure the field and widget module names are filled in, too, and there may be other things that need an update. And you'll have to clear cache_content to force it to go back to the table for the new information.

I'm not supporting the idea of manually updating the tables, I can't spend time debugging problems it might create. The best solution is to go back to your backup and re-do the update following the instructions provided.

sunset_bill’s picture

Went through the upgrade again from the top (well, starting from a backed-up latest&greatest D5 installation), carefully following the directions in this thread and CCK's UPGRADE.txt, enabling the minimal CCK the update.php would do without errors (Content won't update by itself), then adding other CCK modules, updating on those and enabling ANR at the very last. My ANR fields still ended up inactive. Guess that's more of an FYI than anything, since manually updating the 'active' and 'widget_active' columns in my content_node_* tables got things working.

So, to help make my module better, since this issue is categorized as a support request and not a bug report, what hook might I be missing in ANR that would alleviate this? I just ported ANR from D5 to D6 using Coder and Deadwood, and those only catch system stuff, not new hook implementations for non-core D6 modules, so I'm pretty clueless as to what I need to fix.

KarenS’s picture

You're saying you did that and still found that "All CCK custom fields are inactive after upgrading" (the title of this issue), or are you saying only ANR is broken? If it is only that one field, it is a bug in that module and you should report it there.

Status: Fixed » Closed (fixed)

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

cooperq’s picture

Status: Active » Closed (fixed)

duplicate post, see below.

cooperq’s picture

Status: Closed (fixed) » Active

I'm also having this same problem, with "This content type has inactive fields. Inactive fields are not included in lists of available fields until their modules are enabled." Being displayed at the top of the page. I have also noticed that the widgets dropdown box is grayed out when updating or creating a new field. I checked the database and all of the active and widget_active fields are set to 1, so I have no idea whats wrong here.

cooperq’s picture

Status: Closed (fixed) » Active

as a point of clarification, I realized that the widgets box stops being grayed out after I select a field type, but creating new field still does not work, I just get bumped back to the http://example.com/admin/content/node-type/test-content/fields with the same error and nothing is created.

batman1983’s picture

How can i switch on the fields?

my sql result:
field_name type global_settings required multiple db_storage
field_startbild imceimage a:0:{} 1 0 1
field_bild imceimage a:0:{} 1 0 1

I think i have to change the a:0:{} to don't know to write in there.
Can you help me?

KarenS’s picture

Status: Active » Closed (fixed)

This is a very old issue. The original issue is resolved and the code has changed dramatically since it was opened so reopening it is just confusing.

@cooperq - the widget is supposed to be greyed out until you choose a field. That is by design. If you have trouble adding a field file an issue on the issue queue for the type of field that isn't working. That problem has nothing to do with this issue, that custom fields are inactive.

@batman1983 - never never never manually alter the database values! Unless you are an expert on the internals of CCK, which I assume you are not, you will probably break everything. If you have fields that are inactive disable and then re-enable the modules that create those fields. If you still have problems after that, file an issue on the issue queue of the specific field you are having trouble with.

asb’s picture

Hi,

just with my first D5-D6 upgrade I ran into this messy issue; since KarenS asked to close this issue, I'd like to collect some pointers to follow-up issues elsewhere to allow others encountering this issue to locate approaches to solving this recurring problem.

Other approaches to resolve this and similar issues: (search for something like "Convert" or "migrate" plus "CCK" ... "field to"...)

General requests:

Greetings, -asb

lcampanis’s picture

Title: All CCK custom fields are inactive after upgrading » All CCK custom fields are inactive after upgrading or transfering

For those who transfered an entire installation, together with a new DB using an export:

If you come accross the issue where your CCK fields don't allow you to configure or even delete them, then make sure before you export your database, to disable ALL caches under 'performance', clear the caches, and then export your DB.

I'm sure this will help people ;)

R-H’s picture

I had an issue where a bunch of modules got turned off because of using the Features modules. When I re-enabled them CCK was saying that fields couldn't be displayed because modules were missing. The solution for me was turn the CCK modules off and then back on.

texas-bronius’s picture

I stumbled across this thread for the same notice verbiage, but like @R-H, mine was clearly caused by mucking with Features export files. I disabled a fistful of CCK- and Features-related modules and reenabled them, and like @R-H, the message went away.

[edit: Ooh, spoke too soon. While the message went away, when I went to work with my features code, it came back again. I tried repeating, then repeating the update, then reverting, same problem. /]

[edit: I read the message more clearly: Looks like there was some remnants of a field I had removed from the features export code which was never really removed from the db. There's a content_has_extra_fields flag to handle this, but to my knowledge, it's only on the way out ($export) not the way in. At any rate, I reinserted the field in my features code, reverted, and message was gone. I deleted the field via GUI, updated the feature code, and all is well (for now..!) /]

afagioli’s picture

Anonymous’s picture

I have been trying to find a solution for this for about a day now, and finally figured out the issue. I have recently upgraded my D5 installation to D6.22 and found that the Text module of CCK did not run the correct update. It ran 6003 when it needed to run 6002. Once I ran 6002 everything worked perfectly. (Note: this was after I tried manually activating the fields in the DB, so if you have tried that to no avail, this may solve your issue).

I am not an expert on CCK so I do not know if it is a good idea to choose which update to run manually -- so I welcome input from anyone more experienced as to whether or not this is a good approach, but it did work for me.

Hope this helps someone.