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.

Comments

pancho’s picture

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.

jstoller’s picture

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.

pancho’s picture

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.

jstoller’s picture

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.

mcurry’s picture

subscribe

jstoller’s picture

Version: 7.x-dev » 8.x-dev
Issue tags: +content types, +user experience

Unless I missed something, this didn't make it in to D7 and it seems like we missed the boat. I still think it's an excellent idea though, so I'm bumping the feature request to D8.

s.daniel’s picture

s.daniel’s picture

Status: Active » Postponed

I belive this should stay in contrib and not go into core. It is for sure a nice functionality when you need it but while doing Drupal development since Drupal 5.0 I only needed it once. (Actually never, just considered it once)

The point when you need this is usually when you extend an existing website and find out that your decision x wasn't perfect. This is not something someone usually needs. Every added functionality makes the ui harder to get and core harder to maintain. Therefore currently I don't see a chance this could get into core.

Marking as postponed, feel free to reopen if you disagree.

jstoller’s picture

Given what I've learned in the two and a half years since posting this issue, I suppose I'm fine with the idea of it remaining in Contrib. However, we should make sure that Core provides an adequate foundation to facilitate the implementation of this feature.

joachim’s picture

> The point when you need this is usually when you extend an existing website and find out that your decision x wasn't perfect

It's surprisingly often that a client creates a node of the wrong type, in my experience.

Also, on D7 this should really be a general entity converter :)

mgifford’s picture

Issue summary: View changes
Status: Postponed » Closed (won't fix)

Looks like it will stay in Contrib.