Sunday, July 27, 2014

Drupal 6 to Drupal 7 migration of Audiofields: a missing filefields problem

During a recent D6 to D7 upgrade I got stuck on an irritating problem. Although the filefield module has been included in D7 core, during the migrate fields action the system kept presenting me with the impossibility to migrate filefields from the d6 definitions.

PROBLEM

  • Missing field module: 'filefield'. This field cannot be migrated.
  • Missing formatter: The 'hidden' formatter used in 1 view modes for the field_advies_audio field is not available, these displays will be reset to the default formatter.

    The reason for this problem is that the field has a widget_type audiofield_widget and a widgetmodule audiofield. So I naturally tried to upgrade the audiofield module, but this does not solve the problem. CCK migration simply refuses to migrate these fields. Dunno why exactly.  (Instead of Missing field module: 'filefield'. This field cannot be migrated. a better error message would be: Won't do audiofields. Don't fucking like them. Sue me.)

  • Whaaaat??


    SOLUTION

    Manually change the widget_type to filefield_widget and the widget_module to filefield. You can do this via phpmyadmin for instance. Or to do this for the multiple audiofield we've defined, run this query

    update {content_node_field_instance}
       set widget_type = 'filefield_widget', widget_module = 'filefield'
              where widget_module = 'audiofield';

    If you run it directly use the table name with prefix. The above you can run in Devel.

    I will post here lateron how to adress the presentation in the final upgraded site.


    No comments:

    Post a Comment