We have been trying to use this module to deploy a number of book pages. However, it appears that the deploy module is not compatible with book pages.

On the Source server it throws this error "An illegal choice has been detected. Please contact the site administrator."

On the Destination Server it puts this error in the watchdog log "Illegal choice 123 in Book element." (Where 123 is the node id of the book page on the Source Server.)
Additionally, if the book page is a sub-page in a book that is not on the Destination Server it throws the error "Illegal choice 321 in Parent item element." (Where 321 is the node id of the book page's parent on the Source Server.)

Are we doing something wrong, or are books not supported yet?

Comments

sirkitree’s picture

getting this as well - looking into a solution

pavel.karoukin’s picture

StatusFileSize
new2.63 KB
gdd’s picture

I'll try and take a look at this, and if it looks workable I'll be happy to integrate it into Deploy. There are a couple other issues in the queue that stem from this problem

pavel.karoukin’s picture

great!

pleas note, that i didn't checked for dependencies much and for plain menu it will not work if there is few level of hierarchy right now. also, it will work only for menu items pointing to nodes =)

pavel.karoukin’s picture

and, btw, while i got your attention - please check and if they work fine, integrate my patches as well =)

http://drupal.org/node/725688
http://drupal.org/node/675238#comment-2671910

pavel.karoukin’s picture

dixon_’s picture

Issue tags: +beta blocker

I think we should have support for books before we roll a beta. I thinks its only a matter of identifying the dependencies correctly. I'll try to get some code up and working for this soon.

dixon_’s picture

Priority: Normal » Major
rjdjohnston’s picture

subscribe

katbailey’s picture

I spent a few hours on this yesterday - it is NOT a trivial thing to achieve :-( I got it to the point where I could deploy a new book page without problems, but when it comes to deploying a page that references an existing book page we run into trouble. We essentially need to get the remote book id and parent id - these essentially map to nids, which of course have UUIDs but I'm not sure it will be possible to get anything besides the remote nids for inserting into our form values. I'll see if there's any way I can make this work but I fear it won't be possible without some additional processing on the remote end.

I'd be interested to hear if heyrocker or dixon_ or anybody else has also spent time on this and has some findings to share...

gdd’s picture

No sorry, I started thinking about it at the time I was writing Deploy and it really made my head hurt so I gave up. Following the tree is in theory possible it is just very intricate.

katbailey’s picture

Assigned: Unassigned » katbailey
Status: Active » Needs review
StatusFileSize
new8.12 KB

OK I think I have something that works, so it would be great if people could test it and/or sanity-check its logic. For now, I've added on a separate module called book_deploy module which deals with book pages, but I think it probably makes more sense to just roll this into node_deploy module. We can figure out that side of things afterwards - for now it's just about making sure this works.

My solution requires the addition of a method to deploy_uuid_service module to retrieve the remote book information so that the plid and bid form elements can be populated correctly; plus a function in deploy.module, deploy_get_remote_book that sends a request for this method, i.e. similar to what deploy_get_remote_key currently does. It's unfortunate that it requires such extra special treatment but I don't see any way around that :-/

dixon_’s picture

Status: Needs review » Fixed

Wow! Nice katbailey! :) I've tested it quite some bit, and it seems to work flawless!

I don't think we should add this to node_deploy.module since we are using sub modules for all additional fields/dependencies right now. Let's stick to that.

The only thing I find (but I don't consider it a bug) is that you can't deploy one whole book in one go. The closest you get is to deploy the bottom most book page. That will deploy that whole branch up until the top-level book page, but no other branches. If you have a large book with many branches, this will become a little bit tedious.

But, I don't actually know if we want to solve this. The Deploy framework and it's all current sub modules are only taking care of dependencies, and nothing else. So we should probably stick to that. Deploying whole books could be something for 7.x-2.x.

So, I committed this since I think it seems to be in good shape. Win!

Status: Fixed » Closed (fixed)
Issue tags: -beta blocker

Automatically closed -- issue fixed for 2 weeks with no activity.