I need to move content from one content type into another content type on another site that is different in content type name and field names. We had a product showcase on one site and then we had to rebuild it on our beta site, completely re-organize and re-format things. We don't really want to do much work by hand, manually moving information over by cutting and pasting and what not.

So I was thinking, what if I exported the old-out-of_date content types and then went though that file and edited the field names of everything, using a text editor. If I did so, would that work? Would I need to have the renamed fields in the same order as the content type on the new site that I want to move them to?

Or is there a way to make a CSV file in views that will let me re-name fields?

What do you think?

Becky

Comments

danielb’s picture

Status: Active » Closed (works as designed)

This is out of scope (to support such an application) for this module, please see the note on Bulk Export/Import on the home page of this module for a suggestion regarding a CSV import/export method. It *may* work to just change stuff by hand in the export code output from this module, I guess it's worth giving it a go. Perhaps you could make a test node on the target site and export it and compare the export codes to see what needs to be changed. It really depends on how your content types are set up I guess.

beckyjohnson’s picture

Hi there, I actually tried this out with one node and it worked but not perfectly. I got an unknown error message but everything still moved over. I now think this is a bad plan of action though because it is way to labourious to change the arrays that much esp since I have like 100 + nodes to move over. Thanks though, other than that your module works like a charm. Also, if I may clarify, the exporting of files using node- export, it just makes a link to the file when it exports right?

Becky

danielb’s picture

Sorry I'm not too clear on how the file thing works, it was contributed by James Andres, I've been meaning to look into it so I can at least work on issues related to it.

beckyjohnson’s picture

Ok. Cool. No problem.
Thanks,
Becky

asb’s picture

Component: Code » Node export
Category: support » feature

Hi,

I was hoping to accomplish something similar with 'node_export' (moving data between two sites with different naming of the content types and fields, but more or less identical data structures), and it would have helped a great deal to avoid hours (probably days) of stupid manual copying & pasting. Of course it was quite 'sobering' when I discovered that this neither would work as I had expected nor that it would be feasible to manually edit each export - the node export was supposed to make thinks quicker and easier, not the other way around ;) [if filefield configuration and paths don't match exctly, the file export breaks badly, no matter how much you edit the export file manually].

In theory it shouldn't be too complicated to add an additional layer of processing logic to match (or to map)

  • Site A | Content Type A -> Site B | Content Type B, and
  • Content Type A | Field n -> Content Type B | Field m

Then either on the source side the export would be limited to those fields which were chosen to be exported, or on the target site the import would be limited to those fields with configured matches (probably better). A similar logic is used by the 'Feeds' module; it has a "node processor" which allows (to some degree) map "fields" in the source (usually a RSS feed) to fields on the target node; also this "node processor" allows to create and update nodes, so it might be even possible to cannibalize parts of this code.

Anyway, it might be worth a try to check the (heavyweight) 'Feeds' module if nodes of different content types need to be moved between two sites. However, the additional overhead of running a full-blown feed processor just to move nodes between a couple of sites would be quite unpleasant, so I'm changing this issue into a feature request, but leave it closed. I'd like to know if there's a broader demand for such kind of expanded functionality, and if so, I'd like to discuss if sponsoring might be an option.

Greetings, -asb

alexmoreno’s picture

Just for the information of possible visitors, this can be done very easily with Feeds module. For example:

  • create a view with node information in xml format
  • create a feed, and link it to the new feed, mapping everything to the new content type
  • Import it
shreepa.bss@gmail.com’s picture

Issue summary: View changes

hi,

i have two content type: Content Type A &Content Type B

In content Type A there is a filed group

Filed group: filed_1,filed_2,filed_3(text filed)

In content type b there is a filed collection:

Field Collection: field_4,field_5,field_6(text field)

Now I need :
the value of filed_1=filed_4
the value of filed_2=field_5
the value of filed_3=field_6

The following approach will be good or not please let me know:

For content type A: Will create a view and will only add the three fields filed_1,filed_2,filed_3 in views and will create a views data export and will attach with the previous view page and generate the csv file

Then using this module https://www.drupal.org/project/field_collection_feeds will import that for the content B field collection.

Please let me know is it a good approach for migration or there will another way.

Thanks
Shreepa