For some reason, on every alpha1 site that updates to the new session feature to be released in alpha2, we get a CCK error message about there being inactive fields, however there are no disabled modules.

I've resolved it by applying the patch from http://drupal.org/node/863226#comment-3244418 and running:

drush php-eval "module_load_include('inc', 'content', 'includes/content.crud');content_field_instance_delete('field_day', 'session');content_field_instance_delete('field_slot', 'session');"

I think the only thing we need from the patch is the + $field = array_pop(content_field_instance_read(array('field_name' => $field_name, 'type_name' => $type_name), TRUE)); .

We could write an update function that does this for folks updating to alpha2. I realize we don't intend to provide an upgrade path and if anything, this would destroy data in those fields, but would spare folks the annoying error message and the somewhat complicated solution. We should of course provide a warning about the upgrade.

Comments

ezra-g’s picture

Specifically:

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

* Day (field_day) is an inactive Text field that uses a Select list widget.
* Time Slot (field_slot) is an inactive Text field that uses a Select list widget.
* Room (field_room) is an inactive Text field that uses a Check boxes/radio buttons widget.
* Skill Level (field_skill_level) is an inactive Text field that uses a Check boxes/radio buttons widget.

greggles’s picture

Documenting the process, as you've just done, seems like enough to me. I'd make this a documentation task and mark it fixed :)

ezra-g’s picture

Title: Remove inactive fields from Alpha2 upgrade » Document removing inactive fields from Alpha2 upgrade
Component: cod_session » Documentation
Category: bug » task

Cheers.

ezra-g’s picture

Status: Fixed » Active

So the PHP folks want to execute is:

module_load_include('inc', 'content', 'includes/content.crud');
content_field_instance_delete('field_day', 'session');
content_field_instance_delete('field_slot', 'session');
content_field_instance_delete('field_room', 'session');
content_field_instance_delete('field_skill_level', 'session');

ezra-g’s picture

Status: Active » Fixed

I think we can point to this issue in the release notes.

Status: Active » Closed (fixed)

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