This is a terrific idea, but I can't seem to make this work. I installed and activated the module. For my few legacy groups, I created book pages to serve as the parent pages for each group's books. I also created one or two new groups, and noted that Book Expand automatically created parent pages for each of the new groups. So far, so good.
When I enter a group and create a book page, I still have all the site's book pages listed hierarchically in the "parent page" field. And it's possible for the member of one group to post a page into another group's book, even if not a member of that other group. Shouldn't the parent page drop-down be filtered?
For what it's worth, the same behavior is happening in the group forums -- you can post forum topics in other groups' forums, which I really don't want people to do.
My best guess is that I've done something phenomenally stupid here -- can you help me find what I've overlooked?
Feel free to poke through my site; register at es2f.net, follow the links to "groups", then join the demonstration group. I'm happy to supply any information you need to point me in the right direction. Thanks!
Comments
Comment #1
dwees commentedHi Jshuster,
I wrote this module originally for 4.7.x, and I've tried to update it for 5.x, but possibly unsuccessfully. When I get a chance, I'll take a look at your site and see if I can do some trouble-shooting. It sounds to me like you've done everything correctly so far. I assume you have gone to the settings page and chosen which filter you want the module to use?
Dave
Comment #2
dwees commentedWhen I used this module with 4.7.x, the place where I created the new book page was built into the group home page. Can you set up a link there to create a book page? For instance:
Notice that the gid is added at the end of the url, which is how my module gets the current group id that is having a book page added to it.
Dave
Comment #3
Anonymous (not verified) commentedHi, Dave,
Thanks for taking a look at this ... I really appreciate it.
I saw you registered on my site; I've subscribed you to a hidden test group I have, called the "Second Test Group". I put a page there with links to create book pages and forum pages. Give it a test drive ... :-)
Thanks,
Jono
Comment #4
Anonymous (not verified) commentedIn answer to your earlier question, yes, at the book expand admin page I selected the "group" filter.
- Jono
Comment #5
dwees commentedHere we can trouble shoot together. I see one possible error.
Try changing
to
and see if that makes a difference. I need to set up Organic groups on my Drupal 5 site before I can check these changes, but it seems to me that the book form isn't being altered like it should be, and I think it's because they've changed the id of the node forms in Drupal 5.
Dave
Comment #6
dwees commentedSorry my bad the change should be:
Comment #7
dwees commentedI'm too sleepy this morning. Use:
instead.
Comment #8
Anonymous (not verified) commentedDidn't do it ... the parent field still shows the entire book hierarchy with "" selected, when you create a book page.
Unfortunately, I'm not up to speed on drupal module design well enough to trace what's happening. Anything I can do on this end to help narrow things down? For example, to verify if bookexpand_form_alter is actually being called? Or check the variable in the switch?
Thanks again ...
Comment #9
dwees commentedWell the command I usually use to do debugging is echo. For instance:
However, what I'm going to do is to try and set up OG on my test site and see if I can figure this out.
Another thing you could do is test to see if any of the other filters work as advertised. If they do, it's a problem with just that filter, if they don't, it's probably a problem with my logic in hook_form_alter.
Dave
Comment #10
Anonymous (not verified) commentedHi, Dave,
I tried the other filter, and none appears to work.
Specifically, I switched to each of the filters, then (from another computer logged onto another user account), created a new book page. In each case, the parent field is "top-level" and the entire hierarchy appears in the drop-down.
Thanks for looking into this, and let me know what I can do to help -- again, I appreciate it.
- Jono
Comment #11
dwees commentedShould be better now. Just a point to make. If a user is in a group, and uses the link provided on the group home page to create a book page, then my module works as intended. If instead, they choose to create a book page directly, then the module doesn't work. So the solution is to remove the direct 'create book page' (or hide it in an inaccessible menu for the typical user) link and have users only create book pages from their group home pages.
Dave
Comment #12
Anonymous (not verified) commentedDave,
Sorry not to get to trying this out sooner ...
I installed the June 18 version and gave it a go ... but when I create a book page from within the Group menu block, I still get the full book hierarchy (including other groups) in the Parent drop-down field.
That's based on a quick look. When I get a chance, I'll poke around more to see if I can turn up some more helpful information. But, thanks!
- Jono
Comment #13
csc4 commentedI seem to have the same problem, also (not sure if there's any connection) doesn't seem to be writing the log message on Handbook creation
Comment #14
dwees commentedI have checked all of the filters, and they all seem to work as intended. If you are having difficulties there are 2 things to check:
1. Have you updated the filter to the 'OG' type. With the newest version of Book Expand, you should double check that the filter is in the correct place since the order has been modified (to allow for automatic checking of the installation of the private and og modules).
2. Make sure that you have a top level book page created for each group AND that this relationship is matched in the og_book database. If you create some new sample groups, and examine the og_book database, you should be able to see the relationship.
Comment #15
(not verified) commented