Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
attheshow CreditAttribution: attheshow commentedI'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?
Comment #2
asb CreditAttribution: asb commented> 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
Comment #3
attheshow CreditAttribution: attheshow commentedYou 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.
Comment #4
asb CreditAttribution: asb commentedHi,
> 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
Comment #5
fallenleaf CreditAttribution: fallenleaf commentedI 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.
Comment #6
attheshow CreditAttribution: attheshow commentedI 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.
This should change it temporarily to a normal CCK select list hopefully.
Comment #7
asb CreditAttribution: asb commentedHi attheshow,
thank you very much for your help!
The SQL statement changed the status indeed:
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"?
Comment #8
forestmars CreditAttribution: forestmars commentedJust 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.)
Comment #9
TravisCarden CreditAttribution: TravisCarden commentedIn 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:Comment #10
masipila CreditAttribution: masipila commentedI 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
Workaround / fix
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.
Comment #11
attheshow CreditAttribution: attheshow commentedComment #12
afagiolihttp://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.