If you have a node which, in full page mode, displays a list of teasers to other nodes, the edit and delete links will not appear on those teasers. A classic example is organic groups; suppose I have a blog for each organic group, and on my group's home page, I have teasers for the first ten blog posts. The edit/delete links won't appear for those blog posts. This is due, I believe, to a minor issue in the admin_links_link function, which this patch should fix. I've tested it in my own environment, and it works fine.

CommentFileSizeAuthor
admin_links.module.patch539 bytesshaisachs

Comments

dave reid’s picture

Status: Needs review » Fixed

As a part of #503636: Copy the node/%/* local tasks instead of manually providing links I implemented the following function:

/**
 * Checks if the current page is a node page.
 *
 * @param
 *   An optional node ID to check if the current page is a specific node.
 * @return
 *   TRUE if this is a node page, or FALSE otherwise.
 */
function admin_links_is_node_page($nid = FALSE) {
  static $is_node_page = array();
  if (!isset($is_node_page[$nid])) {
    $is_node_page[$nid] = preg_match('%node/' . ($nid ? $nid : '\d+') . '%', $_GET['q']);
  }
  return $is_node_page[$nid];
}

This should fix this issue. Once the 6.x-1.x-dev build is repackaged, please give it a try and let me know if it fixes this problem!

Status: Fixed » Closed (fixed)

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