1
votes

I have created a content type called "ContentA" and in that content type I have two fields, "Summary" and "Title". I have already created a new content type called "ContentB" What I need to do is copy or move the data and fields everything from the first content type "ContentA" to second content type "ContentB" and I'm using Drupal 7.

Is this possible with a module or maybe from SQL. I don't know what to do, I've been trying to do this from weeks and I'm stuck :( please help!

2
You mean that ContentB content type doesn't have the fields in it definition?Syscall
It is having the fields with same name, I want to move the data from ContentA to contentBKumar
And you need to copy the content of nodeA to nodeB, that's it?Syscall
Yeah, need to move all the fields data from ContentA to ContentBKumar
And It should be on the same node ID, it shouldn't changeKumar

2 Answers

0
votes

It seems that you want to change to nodetype of your existing nodes more than you want to copy data from type A to type B.

Have a look at the node_convert module.

Node Convert adds a menu tab "Convert" on the node view page, i.e. node/1/convert, which gives the ability to convert the node from its current node type to another node type. The module provides the means to transfer all the field values of the current node type into fields on the destination node type, or discard them.

0
votes

i have got a solution

this module have some dependencies
after install this module go to for the configuration
url: /admin/config/content/node_export
select the file type which is easy to edit for you i think JSON is a good option then save with JSON selected

enter image description here

Export your nodes:

Go to the : /admin/content then filter with your content type which one you need to export like content_a

select all node and select option "node export" from "Update options Operation"

enter image description here

i know there is only fifty nodes you can do this by multiple time or combine all export file into one file for import later

Now we have all node exported in file mode

you have to change the type field value from this exported file

you can do this by converting this file into easy editable type like
if you export data into json format then convert it in csv file
you can do this online from and the change field value type to your new content type

like "type" column has value "ContentA" change it to your content type name where you want import these contents like "ContentB" then revert this csv file to json format

Now we have to import data in to drupal

Go to : /node/add/node_export

enter image description here

select you exported file and then import

and DONE

for new content type where we want import these content you have to create new content type manually with same field all fields setting and name should be same

it should not get your too much time :)

And you are done

i have tested this form you works fine

HOPE THIS SOLVE YOUR PROBLEM

THANKS