0

In my admin one of the modules I have installed (I am not sure which) has the ability to export a field definition in code, but I can't see any place where I can import the field. I thought that the field creation dialog has abilty to import a field definition from the export code just as the bundle creation tool give the ability to import a bundle.

There is no such thing in the menu and I wonder if I am missing something in the interface or I have to resort to code.

Is there something missing in the admin interface, or do I have to import it in code?

2 Answers 2

1

There is nothing in the interface but what you can do is make a temporary content type which uses the field(s) you wish to import, then export/import that content type to the target site.

Your new field(s) will then be available at the target site, make sure you attach them to other content types before you delete the temporary one or the field(s) will disappear.

2
  • @Daraven It is something I considered, but I am importing it back to the original content type as a new field. Creating it was so complicated and I don't think I can get it write from doing it by hand.
    – vfclists
    Commented Feb 16, 2015 at 5:06
  • Yeah, so just use a new content type as your transport vehicle and attach the field to the original content type once it has been moved. Also look into the Features module, apparently quite useful for migrating settings.
    – Darvanen
    Commented Feb 16, 2015 at 5:10
0

I had the solution installed, but I was using it the wrong way or overlooked something about the way it worked.

The necessary module is the Field Tools module. It has an Export Field and an Import Field option. What you need to do is to export the field definition into code, edit the field name in the code and import it.

Field Tools is worth investigating if you need something like that, and it is has a lot of other features I haven't had the chance to try out yet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.