In the book module, the 'book' path is defined twice.

    $items[] = array(
      'path' => 'book',
      'title' => t('books'),
      'access' => user_access('access content'),
      'type' => MENU_NORMAL_ITEM,
      'weight' => 5);
...
...
...
    $items[] = array(
      'path' => 'book',
      'title' => t('books'),
      'callback' => 'book_render',
      'access' => user_access('access content'),
      'type' => MENU_SUGGESTED_ITEM);

Is there any reason for that or is it a bug? If it is a bug? What should be the correct definiton? Bote hat the former is a normal menu item, but the second is a suggested item. Also, there is the weight set to 5.

I think the correct one is the second definition, may be defined as a normal item, with no explicit weight?

CommentFileSizeAuthor
#2 book.module.bookpath_suggested.patch479 bytesmarkus_petrux
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

killes@www.drop.org’s picture

I consider that a bug.

The second definition will probably override the first. We should thus keep it suggested item in order to not change anything at this point of development. The weight should be removed.

markus_petrux’s picture

Status: Active » Reviewed & tested by the community
FileSize
479 bytes

There you go. It is so simple that I believe this is directly RTBC (/me thinks the second menu item overrides the first one too).

killes@www.drop.org’s picture

Status: Reviewed & tested by the community » Fixed

applied

Anonymous’s picture

Status: Fixed » Closed (fixed)