When editing a user profile with additional fields, there is no link on the user edit page to the local tasks allowing editing these additional fields.

Manually keying http://www.example.com/user/<uid>/edit/<category> works, though

CommentFileSizeAuthor
#5 garland_secondary_tabs.patch791 byteschx

Comments

fgm’s picture

Status: Active » Needs review

Workaround: enable color module. This allows the local tasks to appear.

Kjartan’s picture

Status: Needs review » Active

No code to review.

fgm’s picture

What this means is that there is a workaround to review (the one in the comment): the issue could be solved by either documenting the color.module dependency or removing it. Discussion on irc (notably chx) seems to imply removing the dependency could be done by splitting functionality of color.module in a minimal .inc always included, and the module itself, which could be turned on or not, in which case garland would not need the full module, just the .inc.

profix898’s picture

The issue title is a little missleading, because we are talking about local task tabs and not about a profile specific issue.
However is there any progress on this topic? I'm coming from http://drupal.org/node/93044 (thanks Heine) and I really hope we can solve this one. Neither Garland nor any other (core) theme should depend on the color.module IMO. Local task tabs are a critical theme (intrinsic) feature. Why is color.module needed for Garland theme? What parts are not available without it? CSS? Is there anybody working on this?

chx’s picture

Title: Garland does not display profile fields » Garland does not display secondary tabs
Assigned: Unassigned » chx
Status: Active » Reviewed & tested by the community
StatusFileSize
new791 bytes

Very little this has to do with color module. If color is off then the _phptemplate_variables, after settings $vars['tab2'] returns an empty array. Opsie.

Also there shoudl be some decision made whether _color_page_alter uses references or returns the changed variables. Both are unnecessary and if this is the function name, I am inclined towards references.

chx’s picture

Title: Garland does not display secondary tabs » Garland does not display secondary tabs when color module is off
heine’s picture

The culprit is garlands template.php, which returns an empty array when color module is not enabled.

/**
 * Override or insert PHPTemplate variables into the templates.
 */
function _phptemplate_variables($hook, $vars) {
  if ($hook == 'page') {

    if ($secondary = menu_secondary_local_tasks()) {
      $output = '<span class="clear"></span>';
      $output .= "<ul class=\"tabs secondary\">\n". $secondary ."</ul>\n";
      $vars['tabs2'] = $output;
    }

    // Hook into color.module
    if (module_exists('color')) {
      return _color_page_alter($vars);
    }
  }
  return array();
}

No time to roll a proper patch unfortunately.

heine’s picture

Sorry, I should have refreshed; didn't see your reply chx.

profix898’s picture

The patch works nicely. Thx chx.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)