I just fixed a problem with og_user_roles and bookmadesimple in case anyone else encounters it.

Non-book content types do not get added to the book outline when og_user_roles is enabled.

To fix it change the following code (which appears in 3 places: 1175-1177, 1235-1237, & 1408-1410) from:

<?php
if (module_exists('book') && $type == 'book' && arg(3) == 'parent' && is_numeric(arg(4))) {
  $path .= '/book/parent/'. arg(4);
}
?>

to:

<?php
if (module_exists('book') && arg(3) == 'parent' && is_numeric(arg(4))) {
   $path .= '/' . arg(2) . '/parent/'. arg(4);
}
?>

Seems to work fine after that and doesn't have any ill effects. I'm not sure this is the best way to handle it, so I didn't roll a patch. Let me know if you want one.

Comments

somebodysysop’s picture

Thank you for the fix. I will commit it shortly to cvs. I believe this problem is already fixed in 6.x since "parent" is part of the query as opposed to part of the path.

WorldFallz’s picture

No problem-- happy to be able to help YOU for once!

somebodysysop’s picture

Assigned: Unassigned » somebodysysop
Status: Active » Needs review

Code modifications committed to cvs. Will be available for download in dev release in about 12 hours. Please test and report back. Thanks.

somebodysysop’s picture

Status: Needs review » Fixed

Assuming fixed.

Status: Fixed » Closed (fixed)

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