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.
I want to change a field type from term reference to entity reference
how to do that without disturbing the features default
if i delete a field and recreate, any updates to features would again change it
Comments
Comment #1
mh86 CreditAttribution: mh86 commentedIf it's a different field, then it's best to use a different machine name for the new one. Otherwise wired things might happen.
As a next step, export the newly created field into a custom module of your website and unset the old field in hook_field_default_fields_alter(). Then all features should stay in the 'default' state.
Comment #2
kaizerking CreditAttribution: kaizerking commentedcould you pl post example snippet, i could not find any
i wanted to alter the organization(company name) field type to entity reference and use "entity connect" module to create organization node and maintain a single organization data for applicants and recruiters
my apologies if this request is out of context
Comment #3
mh86 CreditAttribution: mh86 commentedOne possibility is to remove the organization fields from the job content types and then add following code to a custom module:
(Note: I did not test this code)
One disadvantage of this approach: This field might be used somewhere else as well, e.g. in the job search and deleting it might lead to some problems or require a few more overrides.
An alternative to this is to use field permissions and hide the field from 'normal' users.
And one more thing: instead of coding you might give Features Override a chance. I haven't tried it for a while.