Did you even test your RC ??
After installing your module, I noticed nothing happens...no links added to if I choose "Link" in the settings. No tabs added if I choose "Tabs". First, there's this problem (easily patched, luckily):
function rearrange_child_pages_access($nid, $type) {
$has_children = db_result(db_query('SELECT ml.has_children FROM {book} b INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE b.nid = %d', $node));
Your parameter is $nid, but you use $node in your query. Not a big deal, but it breaks your entire module, as the function will always return FALSE.
Then, you call the book_admin_edit function in your hook_menu()...This always triggers an error, because the file that defines this function is not included.
Change your _menu() hook to include book.admin.inc:
$items['node/%node/rearrange'] = array(
'access callback' => 'rearrange_child_pages_access',
'access arguments' => array(1, 'tab'),
'page callback' => 'drupal_get_form',
'page arguments' => array('book_admin_edit', 1),
'title' => 'Rearrange child pages',
'file' => 'book.admin.inc',
'file path' => drupal_get_path('module', 'book'),
'weight' => 5,
'type' => MENU_LOCAL_TASK,
);
I'm going to try it one more time, see if it works after patches are applied.
Comments
Comment #1
wadmiraal commentedAdding patch
Edit: see #4
Comment #2
wadmiraal commentedOk, good. Now it's seems to work fine.
Try applying these changes, as your module does not work without them.
Kind regards
Comment #3
wadmiraal commentedThe "Link" option didn't (and couldn't) work either.
Updated the patch. Use this patch instead of #1
And please test your module before making it a RC ! This type of errors can give the whole Drupal project a bad image. This should have been an alpha !
Kind regards
Edit: see #4
Comment #4
wadmiraal commentedAnd another one...
user_access('administer book outline')should beuser_access('administer book outlines').Sorry, I should have triple checked your code and submitted only one patch. Use this patch instead of the ones in #1 and #3.
Comment #5
nirbhasa commentedIll take a look in the next couple of days, and apply the patch. I certainly know the module is working on my production sites. It may be that i somehow accidentally uploaded another pre-release version, because those mistakes are a bit embarrassing :)
Comment #6
nirbhasa commentedActually...this issue is a duplicate of #888878: unable to see the link or tab, lets do the fix there
Comment #7
wadmiraal commentedYep, sorry for the duplication.