I'm upgrading a site from 4.7.x to 5.x. I want to convert to book type nodes to story type, How I can do that?
---
Sharique

Comments

vito_swat’s picture

Upgrade page as is than use Nodetype module to change type of a node. After change you may want to uninstal Nodetype.

Vito

Christefano-oldaccount’s picture

I would first upgrade to D5 and then install the Node type module. With Node type, nodes can be switched from one type to another.

http://drupal.org/project/nodetype

If you have too many book page nodes that you don't want to switch each one individually, you may be able to look at how Node type works so you can run an SQL query to do it.

nancydru’s picture

It's amazing what you can find when you browse the core modules. Try this:

node_type_update_nodes('book', 'story');

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database

sharique’s picture

I want to keep taxonomy as it is.
---
Sharique uddin Ahmed Farooqui
IT head, Managefolio.com

Sharique Ahmed Farooqui

nancydru’s picture

All this does is run an update against the database; there's no reason for the taxonomy to be changed. You might, however, want to edit the vocabulary to change the content types to which it applies.

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database

sharique’s picture

for mass conversion.
I have more that 10000 nodes, I can't edit every node.
------
Sharique uddin Ahmed Farooqui
IT head, Managefolio.com

Sharique Ahmed Farooqui

nancydru’s picture

The only thing you have to edit is the vocabulary to have it apply to the content type that you're changing to. "node_type_update_nodes" will get every node. But your taxonomy says it applies to book pages and you will need it to apply to stories.

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database

garym’s picture

(never mind, I neglected the php tags. Full scale conversion worked! Thanks Nancy...)

I want to convert "forum" postings to a new basic content type I created called "discussion" (which will only be used in Organic Group discussions). So how do I run "node_type_update_nodes" function? Do I put it in a page? I'm using 5.1 Thanks in advance....

klcthebookworm’s picture

I have upgraded to 5.1, installed nodetypes, and want to change story nodes to books/book pages so users can better navigate through different books and chapters.

Nodetype is working fine making the story node a book page, but when I go to Administer -> Content Management -> Books those pages are not listed. When I tried to associate the next book page with what should be the parent, it's not listed in the drop down to do that. I don't know if this makes any sense, but I don't seem to have a link to "add a child page" on the ones I switch using nodetype.

And a mass conversion would probably be nice too, as long as you explain to me how to use it. I'm not too good with the database stuff.

tm’s picture

might have to use one of these solutions in the future.

mass-update modules for non-coding site admins would be a nice "feature," but the potential for disaster is mind-boggling.