The links for book pages (e.g. 'add child page') did not show up once synonym_collapsing was enabled. It took awhile to find the cause but using the Devel module I modified node.module:node_view to do this:-

  if ($links) {
    $node->links = module_invoke_all('link', 'node', $node, $teaser);
    dpr($node->links);
    drupal_alter('link', $node->links, $node);
    dpr($node->links);
  }

The dpr calls showed links had the three expected entries before the drupal_alter call and zero entries afterward. A little further diagnosing inside drupal_alter showed the entries were erased by synonym_collapsing_link_alter.

Disabling the synonym_collapsing module allowed the book links to show up.

Comments

reikiman’s picture

Sheesh, I just stoped to read the code of synonym_collapsing_link_alter

It goes something like

function synonym_collapsing_link_alter(&$links, $node) {
  if ($node != NULL) {
    $links = array();
    ... do stuff ...
    return $links;
  }
}

Um, clearly this is going to totally replace $links with a completely new array. How can this possibly work?

scotty’s picture

Priority: Normal » Critical

In fact, I just spend a couple of hours trying to figure out why my node links were getting replaced by taxonomy terms. I forgot I had enabled synonym_collapsing. I'm not using the Book module.

Downloading 6.x-1.0-dev fixed the problem. Great module!

(Sorry, didn't mean to make it critical--can't edit it back.)

asb’s picture

Status: Active » Closed (duplicate)