Change node type mechanism
jstoller - February 7, 2008 - 20:02
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | node system |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
There should be a simple, built-in, mechanism to change the node type of an existing node. I foresee something where data fields from the old node type can be mapped to fields in the new node type, or ignored, and any missing fields can be filled in. Then the updated node can be previewed before the change is committed to the database.
If you want to get fancy, it would also be nice to have a bulk conversion capability. That way you could convert every node of type A (or a subset meeting certain conditions) to type B in one fell swoop.

#1
This is a great idea. But as you said, for core we'd need to go far beyond what the contrib Nodetype module does.
Let's wait with this until most of new D7 functionality has been introduced and is stable, otherwise we need to change this 100 times. I think this is a task for this summer.
Bulk conversion seems to be out of scope though.
#2
Truthfully I'm more designer than developer, but it seems to me the hard part will be developing the basic mechanism to change a node from one type to another. After that, I'd think changing lots of nodes from one type to another would be relatively straightforward. Assuming of course that they were all the same node type to begin with. You're essentially just automating the repetition of the single node change process many times. I imagine there are many situations with big sites where that capability would be a godsend. Personally, however, right now I would be happy if I could just change one node at a time.
#3
Certainly you are right, that the basic conversion mechanism is the most difficult task, and it is that difficult that it hasn't even been adequately solved in contrib.
On the other side: Bulk conversion needs to be batched and that is pretty complex to do if you need additional user provided data for every single node. It would need a lot of code, and that should probably better live in contrib.
#4
I assumed that in the case of batch conversion, any additional user provided data would apply to all nodes in the batch, rather than allowing individual nodes to be updated with different data. I also assumed that previewing updated nodes before conversion would not be an option with batch conversion. These limitations should make the process somewhat simpler and I believe they are acceptable trade-offs for the convenience of batch conversion.