Hi,

after upgrading from D5 to D6, I'm getting the following error.

This content type has inactive fields. Inactive fields are not included in lists of available fields until their modules are enabled.
Werke in diesem Programm (field_foo) is an inactive Node reference field that uses a Multiselect widget.

I followed the CCK upgrade instructions (disabled all contributed modules, then re-enabled them), and in D6 I disabled content module, re-enabled multiselect module again, but the error still persists. Of course I ran upgrade.php numerous times.

I'm setting this to "critical" since this widget seems to block access to the CCK field completely. Feel free to set it to "normal" if there is a way to get the CCK field back with whatever measures are necessary.

Thanks & greetings, -asb

Comments

attheshow’s picture

Status: Active » Postponed (maintainer needs more info)

I'm not familiar with this message. I'm assuming it's coming from CCK. Are you able to temporarily switch the field to just a basic "select" widget for testing purposes to see if the error message goes away?

asb’s picture

> I'm not familiar with this message. I'm assuming it's coming from CCK.

Yes, most probably.

> Are you able to temporarily switch the field to just a basic "select" widget for testing purposes to see if the error message goes away?

No, at least not that I would be aware of any possibility (that's why I set this issue to "critical" and what I meant with "seems to block access to the CCK field completely").

KarenS from the CCK team claims that a behaviour like this can have two causes: It happens a) if people don't disable CCK and the contributed modules when upgrading; b) if a module does not "implement all hooks" (whatever these might be). Since I followed the upgrade instructions precisely, this should not be an CCK core issue.

Regarding the possibility of a) KarenS suggests always an workaround (disable content module and all contributed modules, then re-enable content module and the depending modules; the issue queues are full or errors like this); I tried that several times already, so far without luck.

Greetings, -asb

attheshow’s picture

You should be able to temporarily change the widget for your field. Go to Content Management > Content Types > Edit [YOUR CONTENT TYPE] > Manage Fields > [YOUR FIELD] > Change basic information > Widget type: Select list.

Then try to create a new node of this type and see if you're getting the same issue. If you're still seeing it, that means it's not being caused by something related to Multiselect. If you aren't seeing it after the change, then we'll need to investigate further.

asb’s picture

Hi,

> You should be able to temporarily change the widget for your field. Go to Content Management > Content Types > Edit [YOUR CONTENT
> TYPE] > Manage Fields > [YOUR FIELD] > Change basic information > Widget type: Select list.

Sorry, I have no idea how I could edit a field hat is not even listed. Again, the error message says:

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

If the content type is called "foo" and the field is called "field_bar", "field_bar" is not listed at ./admin/content/node-type/foo/fields. "field_bar" also can not be accessed directly through an URL like ./admin/content/node-type/foo/fields/field_bar.

Or am I missing something?

Greetings, -asb

fallenleaf’s picture

I have the same problem.
The multiselect field doesnot appear in the nodetype filed manager.
How to active it?
If you can solve this, plz tell me.Thx.

attheshow’s picture

I strongly recommend making a backup of your database before you try this.

You can try manually changing the field type directly inside the database with the following commands. Be sure to replace [YOUR-FIELD-HERE] inside the command.

UPDATE `content_node_field_instance` SET `widget_type` = 'optionwidgets_select',
`widget_module` = 'optionwidgets' WHERE `field_name` = 'field_[YOUR-FIELD-HERE]';
TRUNCATE `cache`;

This should change it temporarily to a normal CCK select list hopefully.

asb’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Hi attheshow,

thank you very much for your help!

The SQL statement changed the status indeed:

This content type has inactive fields. Inactive fields are not included in lists of available fields until their modules are enabled.
Werke in diesem Programm (field_werk_0) is an inactive Node reference field that uses a Select list widget.

Option Widgets 6.x-2.4 is active and enabled, so the field is still marked as "inactive" by CCK (really ugly, IMHO). So I once again disabled CCK and all related modules, ran update.php, enabled content.module, ran update.php again, enabled option widgets, ran update.php again - the error message as stated above remained. At this point it's - at least from my point of very limited understanding - pretty obvious, that CCK is still broken in processing upgrades. However, after enabling the rest of the CCK related modules, I got access to the "field_werk_0" back!

Additionally, enabling and adding and using the "Multiselect" widget worked again!

Once more: Thank you very much for your help!
Greetings, -asb

PS: I'm switching the status to "closed"; however, maybe you could check with KarenS about those "unimplemented hooks"?

forestmars’s picture

Just to note, you don't really have to run update.php all those times.

It should be sufficient to change the widget in your database, and then re-install the CCK modules (You can use Devel to do that.)

TravisCarden’s picture

In case it's of help to anyone else... I had the same problem here except that the module for the given widget was actually installed. In that case, just changing the widget_active column on its table row did the trick—no need to change the widget type at all. So, in the form of an SQL query based on the above (#6), it would be as follows:

UPDATE `content_node_field_instance` SET `widget_active ` = 1 WHERE `field_name` = 'field_[YOUR-FIELD-HERE]';
TRUNCATE `cache`;
masipila’s picture

Version: 6.x-1.5 » 6.x-1.7
Status: Closed (fixed) » Active

I just upgraded from D5 and used the latest 6.x-1.7 version of this module. Using the latest CCK 6.x-2.9.

Multiselect fields didn't show up in my nodes and they were missing from the 'manage fields' view of content type administration, too.

Reason

  • The reason for this behavior is the same as suggested in comment #6:
  • the column 'widget_active' was left to value '0' in the {content_node_field_instance} database table.

Workaround / fix

  • Manually updating these values to '1' for all records where the widget_type is 'multiselect_select' fixed the problem.
  • Remember to clear cache after this (using e.g. devel module or the button on admin/settings/performance)

Fix for root cause
It would be useful if someone could investigate the root cause of why 'widget_active' is left '0' during the upgrade. I don't have experience on implementing widgets to CCK so unfortunately I can't help on this but I hope that the information above helps in this.

Edit:
Added the clear cache step to the workaround.

attheshow’s picture

Status: Active » Closed (fixed)
afagioli’s picture

http://drupal.org/node/500360#comment-3966954 enabled my old d5 text field at first.

Still, /edit and /devel were giving empty values, so useless.

Since I prefer not to touch Drupal DB schema , I went for a different approach:

.create a brand new field with same attributes (example: fieldname_d6)
.copy values from old column to new column by SQL :
update content_type_quartiere set field_new_d6_field_value = field_old_d5_field_value ;

After which, I had same old values from Drupal 5 inside a brand new D6 cck field.
If your custom code needs thosevalues, you'll have to correct SQL in your module code with new field name, of course.