Over the last 3 days I have had 5 different people contact me regarding the patch found at http://drupal.org/node/14120.
The questions that I am getting are often the same. So I have decided to create this FAQ as a place to answer those questions and offer a forum to discuss the patch and its functionality.
1.Q: Does this patch work with Drupal 4.5x?
A: The patch was developed using the latest version of CVS at the time of writing. The patch has not been tested with 4.5x. But, there has not been too much activity in the book.module since the release of 4.5, so it wouldn't be too hard to apply the patch by hand if you know what you are doing.
2.Q: Does this patch work with Drupal 4.6 RC?
A: The patch was developed using the latest version of CVS at the time of writing. The latest version of the patch worked with Drupal CVS as of February 6 2005. Drupal went into a code freeze for new features on February 11th 2005. This does not mean however that this patch will apply cleanly today, as there may have been other minor modifications to help text or UI improvements since that date. Once again, if the patch does not apply cleanly, it should be very easy to apply by hand if you know what you are doing.
3.Q: I've applied the patch to my drupal site, but couldn't seem to get it working. What am I doing wrong?
A: You might not have done anything wrong with this patch. However, in order for this patch to work you will also have to apply the patch for menu.inc found at http://drupal.org/node/15198. As with the book module, the patch found at http://drupal.org/node/15198 was developed using the latest CVS version of menu.inc at the time of writing. With regards to the suitability of this patch see questions 1 and 2.
4.Q: This is just the functionality I have been looking for. Will this code be part of the Drupal 4.6 core?
A: No. As far as I know (as of March 9th 2005) this will not be included as part of Drupal 4.6. While the code is clean and has gone through some peer review by other drupal developers it has not been scheduled to be included in this current release. If you do test this patch and it is everything you hoped it would be, show support for it and maybe it can be included in Drupal 4.7. On the same note, if you find the patch lacking in some technical capacity please post your issues in the http://drupal.org/node/14120 issue thread and I will be sure to fix them.
5.Q: Will you continue to maintain this patch?
A: Yes. Once Drupal 4.6 is released I will update the patch to make certain that it is up to date and working. I have not updated the patch over the past month because since it wasn't applied to core it did not make sense to maintain it during the code freeze preceding the release of 4.6 (as the CVS code is constantly changing prior to a major release and I may have had to update the patches on an almost daily basis).
I am also considering releasing this as a separate package of pre-patched files so that the installation is much easier for the average user. I am awaiting the activation of my Drupal CVS account and may release the pre-patched files officially through the Drupal site in some way. But, I will almost certainly be making these files available from my own site when they are ready (bookmark this thread as I will post the link here when the time comes).
Once I am in the process of creating all the updates for 4.6 and pre packaging these files, I am also going to back-port this to Drupal 4.5x to make it available to those users as well.
6.Q: You say you are going to do all of this when 4.6 is released. When will that be?
A: Soon. Since there has already been a Drupal 4.6 release candidate it is likely a matter of days or, at most, a week or two away.
I hope that that this answers the most common questions. Feel free to post other questions as well or send me a message via http://drupal.org/user/11015/contact.
andre
Comments
Thanks for posting this
Sorry I couldn't have been of more assistance with testing the patch earlier but it just wouldn't fit into my time budget. Good work. I'll be sure to test it out and help you advocate for its acceptance into the core.
Here is my vote
Thanks for your good work Andre!
This is exactly the functionality I have been waiting for. I'd love to see this kind of functionality in core.
I never really understood why book menus could only be shown on book pages. I think you should be able to show book menus wherever you feel they can be useful for visitors.
Why limit the options of the administator: let him show book menus on other node types if he wants to. Being able to do so doesn't mean you have to: sites like drupal.org could still choose to show book menus only on book pages. One does not exclude the other.
Just as we can choose on which node types to have author and date info, we should be able to decide on which nodes to show book menus.
This should be in core
Likely there are not enough people building static-style sites that really benefit from this patch to perhaps understand it's usefulness. It needs to be in core.
It is likely we (Bryght) will include this with our distribution, and help keep it updated, especially as we move forward on using menu for primary and secondary link management as well.
Thanks again for all your hard work on this Andre.
Update
Drupal 4.6 has hit the street and as promised I will be updating this patch - and likely bundling up a pre-patched solution for the less php/cvs savvy.
I'm just in the process of wrapping up a project for a client but should have time later this week.
I've noticed a few comments here and there and I am going to try and improve the patch and the functionality based on those comments before I go ahead and release the work to the world.
As always - check back here for updates.
andre
p.s. thanks to all for the kind words, comments, suggestions and support.
Almost ready
I've got my CVS space worked out and for the time being my sandbox is where you will be able to find the pre-patched versions of this work. The files are not there yet, but they will be found in:
http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/andremolnar/b...
Always read the readme.txt files first. They will include installation instructions and notes on changes and improvements (if any).
andre
Book module patching
I look forward to your files for the dynamic book menu!
I am still trying to get both of the following patches working together: book.patch_1.patch (for showing the root page of the book in the nav block), and the book_patch_10.patch (for displaying the book nav block on every page). If I apply patch_1 first, then apply patch_10, everything from the first patch is applied without a problem, but patch_10 fails at line 158 and the rest succeed with lines offset. However, I think the second patch may overwrite the functionality of the first, as I still can't get to the root book page from the navigation block. Getting this code to work would definitely be one way to get my menus working... maybe I'll just have to look at the patches and edit the book module in my text editor.
Thanks again for all your help. I look forward to getting Drupal to do good things for hierarchal, orginazational sites!
hmmm
Not quite sure I follow what you are doing, but if you mean to say that you are applying patch 1 and patch 10 from http://drupal.org/node/14120 that is the problem. Apply ONLY the latest patch - any prior patches are deprecated by latest patch.
I'll try and upload the pre-patched files later today - tomorrow at the latest.
andre
patch for root page
Since I'm trying to use these book nav blocks to navigate the site from every page, I would also want to have the root page of the book appear in the navigation. Right now, the book module doesn't arrive with this feature (who knows why). So, I'm trying to apply the patch at http://drupal.org/node/20831 to enable this functionality as well. I didn't think the other patch allowed for this... let me know if I'm wrong... or if the functionality of both patches should be combined. Let me know what you think...
In the meantime, I'll apply your patch first and insert the other patch manually.
Update:
The aforementioned "root page" patch (displays the root page of a book in the book navigation block) works for the original behavior of book block navigation-- hence the root page only appears in the block with the overall book navigation block when you are browsing the book itself.
I would like this top-level or parent book page to appear in the nav blocks that can be enabled for all pages on the site. Would this be an easy thing to do: combine the functionality of both of these patches? It would seem to be a desireable behavior for the navigation menus of a hierarchal website.... maybe I should just be patient and see what shows up in your repository sandbox. Thanks again for your help!
Won't work together... yet
The way the orginal book module and the 'new' version create blocks is completely different. If the other patch makes it into core, I will add the same functionality to this version, but I don't want to fork this farther than it needs to be forked for the time being.
The solution would be relatively simple - if you really need this contact me directly and I can either point you in the right direction - or if you want to sponser such a change I'd be willing to do it for you.
andre
Pre-patched version for 4.6 available.
I've uploaded the pre-patched files for Drupal 4.6 to
http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/andremolnar/b...
For notes please refer to the README.TXT file. Pay close attention to 'known issues' to see if this is the right solution for you.
A version for Drupal 4.5 should be forthcoming, but I'll have to set up an installation of 4.5 on my server to test it. The block module has changed quite a bit so I'm going to have to make sure that everything works with the old 4.5 version.
andre
book block visible only for logged in users
Using these (although have just applied relevant edits to newest versions of book.module + menu inc, since these are from Apr. 05) + all works great. Thanks!
What I'm wanting now is to have this book block visible only for logged in users. In my experiments with the php snippet that I use to show a block to logged in users (node/13266) I've not been able to adapt to a module.
Asking for php assistance (or info if this is not possible) for this version of book.module to show the book block visible only for logged in users.
I was looking for that stuff !
When Drupal's search engine pointed on this modification of the book module, I knew it was what I needed. After hours trying to get the good patch version for 4.6.5(indeed, it was book_module_11_0.patch), and trying to apply this patch, running on Windows, I managed to do it, and I want to say that this little patch makes my work much easier !
Please Elaborate
I am working on getting this information added to the handbook
Please elaborate in detail the steps you took to get it working
Thanks
-------------
suggest check in with author
I suggest checking in with the author.
As I wrote in my post a few above, I took from the pre patched version in his sandbox + applied the changes to the newest versions of the modules. I don't know if this results in the same as applying the latest patch to the latest modules. As I said above, there has been no activity in that sandbox since Apr, 05.
I really support this development to continue, but I'm not a php programer of this caliber.
-----------------------
http://echozone.com
OK
I tried out the link that you gave in your previous post and the book menu items seem to work as described but when I click on the link from the navigation menu I get logged out for some reason.
Is this a known issue that is not mention in the readme?
-------------
seems not related
I had experienced that rarely (not reproducible), + could have been even before I changed these modules. It's not happening now. I'm using 4.6.5 btw.
-----------------------
http://echozone.com
No activity
Hehe - nope - there hasn't been any activity in the sandbox - but that's mainly because I've been waiting for the official 4.7RC to be released before I create the latest pre-patched files.
I had patched against CVS head ages ago (when it looked like the 4.7 release was coming soon), but things have surely changed since then and I've held off any more patches as a result. (But, I did have it working - so I anticipate that it won't be hard to have it working again).
Long story short - I will update things once again when the latest version of Drupal officially ships.
As for weird logout problems when clicking on the links.... hmmmm - don't ever recall that happening. If anyone can reproduce this let me know and I'll look into it.
It should be noted that menu-on-the-fly type functionality will be part of 4.7 - so the functionality these patches offer may no longer be required by anyone... but then again... who knows. I'm sure that people will let me know one way or another.
andre
It should be noted that
I didn't find this functionnality, and the patch, which was working with 4.7 beta 6, doesn't seem to work with 4.7 RC2, any idea/project ?
Something similar in 4.7 ?
Hello,
Does anyone think that something similar to this patch could be developped for Drupal 4.7?
I mean, in 4.7, currently, we can associate menu entries to book pages, but we have to do this for each page, and we must create manually the menu associated to the book. It would be useful to have in 4.7 the functionality this patch provides:
Please tell me what you think about this.
Book navigation as a block
If you go to adminsiter->blocks, you can enable a book menu with a checkbox and in 4.7 you can assign this block to several regions. This may accomplish some of what you are looking to do, without having to create menus one-by-one... this may be obvious, but just in case...
Book navigation doesn't always show...
What I would like is one hierarchical menu for one book which would display on all pages.
The book navigation block, as I know, only shows up when you are navigating into the book, which is too restrictive for me... :(