Created a panel for user/%user
set the access permissions to only one but did not select any rules
added content to page
saved it

when i goto user/%user I do not get my new panel.

HELP.

Thanks,
C

Comments

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

I can't duplicate this.

Method:
Visit admin >> build >> pages
Under system pages, in the 'user view' column select operations and task handlers.
Add a new panel task handler.
Under panel content, add the "User profile" content from the "User" category.
Save and return.

Then visit user/1 and user/3 -- both show my new panel.

socialnicheguru’s picture

It's a problem with my install that I am trying to troubleshoot now :(

I had panels 2 and just installed panels 3.

I installed panels3 on my dev system and all is good

but not on my beta. It is not overriding the user/%user page. It must be a module and I will have to find it.

socialnicheguru’s picture

Title: Panel override for user/%user does not work » REALNAME module stops panel override from working
Project: Panels » Real Name
Version: 6.x-3.x-dev » 6.x-1.x-dev
Component: Panel pages » Code
Status: Postponed (maintainer needs more info) » Active

I was using panels 3 and attempting the override a page

panels 6.x.3.

with Realname module installed I could not use panels to override any page

socialnicheguru’s picture

Project: Real Name » Panels
Version: 6.x-1.x-dev » 6.x-3.x-dev

I am keeping this here so that others who might have the same issue can more easily find it.

i have not found a workaround or a reason for Realname disabling override of panels.

I had to deactivate real name

merlinofchaos’s picture

Probably the realname module *also* attempts to override user/% and Delegator and that module fight over it, and because realname runs later, it wins. I don't know that there's much I can do about that for now, except to try to find a way of figuring out when stuff like this happens and providing a warning to the user that it is happening.

i18ntaxonomy has a similar issue.

andrewsuth’s picture

Possibly related to Use theme_username() in the personal contact form issue in Drupal 6.10?

See if installing the latest Drupal 6.11 core fixes the problem.

cgillogly’s picture

I'm running drupal 6.11 and had the issue of panels not overriding the user/% until I disabled realname, so this seems to be a different issue.

merlinofchaos’s picture

Status: Active » Fixed

I checked in code to alleviate this somewhat. It doesn't actually fight realname for the privilege, but it *does* give you a message now that it can't take over the page and you get to decide how to deal with it. If realname wants to cooperate, it can provide information to delegator so that you can build panel pages using its information, or not. That's going to be up to the realname.module developers.

nancydru’s picture

Status: Fixed » Active

Earl, if you give me some hints as to how to "cooperate" I will gladly consider it. I guess taking over theme_username is not what you have in mind for cooperating.

merlinofchaos’s picture

I am not sure what realname actually does that requires taking over user/% so it's difficult for me to provide hints =)

nancydru’s picture

function realname_menu_alter(&$callbacks) {
  $callbacks['user/%user_uid_optional']['title callback'] = 'realname_user_page_title';
  $callbacks['user/%user_uid_optional']['page callback'] = 'realname_user_view';
  $callbacks['user/%user_category/edit']['page callback'] = 'realname_user_edit';
  if (isset($callbacks['user/%user/track'])) {
    $callbacks['user/%user/track']['page callback'] = 'realname_tracker_page';
  }
  if (isset($callbacks['user/%user/contact'])) {
    $callbacks['user/%user/contact']['page callback'] = 'realname_contact_user';
  }
  if (isset($callbacks['blog/%user_uid_optional'])) {
    $callbacks['blog/%user_uid_optional']['page callback'] = 'realname_blog_page';
  }
  // Remove the core user_search, if requested.
  if (variable_get('realname_user_disable', FALSE) && isset($callbacks['search/user/%menu_tail'])) {
    unset($callbacks['search/user/%menu_tail']);
  }
}

function realname_user_page_title($account) {
  global $user;
  $myacct = variable_get('realname_myacct', t('My account'));
  if ($user->uid == $account->uid && $myacct) {
    return $myacct;
  }
  $name = (isset($account->realname) ? $account->realname : realname_make_name($account));
  return $name;
}

function realname_user_edit($account, $category = 'account') {
  realname_check_breadcrumbs($account);
  return drupal_get_form('user_profile_form', $account, $category);
}

function realname_blog_page($account) {
  $output = blog_page_user($account);
  drupal_set_title($title = t("@name's blog", array('@name' => $account->realname)));
  return $output;
}

function realname_tracker_page($account = NULL, $set_title = FALSE) {
  if (function_exists('tracker2_page')) {
    $output = tracker2_page($account, $set_title);
  }
  else {
    $output = tracker_page($account, $set_title);
  }
  
  if ($account) {
    realname_check_breadcrumbs($account);    
    drupal_set_title(realname_user_page_title($account));
  }
  return $output;
}

function realname_theme_registry_alter(&$theme_registry) {
  if (!empty($theme_registry['form_element'])) {
    $path = drupal_get_path('module', 'realname');
    if (variable_get('realname_theme', TRUE)) {
      $theme_registry['username']['function'] = 'realname_username';
      $theme_registry['username']['file'] = $path .'/realname_theme.inc';
      $theme_registry['username']['theme path'] = $path;
      $theme_registry['username']['theme paths'][0] = $path;
    }
    $theme_registry['user_admin_new_role']['function'] = 'theme_realname_new_role';
    $theme_registry['user_admin_new_role']['file'] = $path .'/realname_theme.inc';
    $theme_registry['user_admin_new_role']['theme path'] = $path;
    $theme_registry['user_admin_new_role']['theme paths'][0] = $path;

    $theme_registry['user_picture']['theme path'] = $path;
    $theme_registry['user_picture']['theme paths'][0] = $path;
    foreach ($theme_registry['user_picture']['preprocess functions'] as $key => $value) {
      if ($value == 'template_preprocess_user_picture') {
        $theme_registry['user_picture']['preprocess functions'][$key] = 'template_preprocess_user_picture_realname';
      }
    }
  }
}

I don't know why these should interfere with Panels/Ctools at all. And I don't know Panels or Ctools well enough to even set up a test environment.

merlinofchaos’s picture

Well, these interfere because delegator tries to take over the user/% page so that panels can be applied. Realname also takes over the user_view page (though you didn't include that code, so I don't know what it changes).

Right now, Panels will defer, so the realname module will get to take over the user/% page and allow the user to make panels out of it. So in theory, realname just needs to provide alternate content or give Panels the necessary content.

I do see some breadcrumb thing in your code that may be relevant. I haven't done a great deal of work with breadcrumbs so maybe there's something else that needs to be done there.

mrjavum’s picture

Here is my try to fix this problem:
http://drupal.org/node/443880#comment-1634550

merlinofchaos’s picture

Status: Active » Closed (won't fix)

I've done all I can here, and work is going on in the link mentioned in #13.

nickbn’s picture

I'm willing to pay a bounty to have this fixed. Contact me if interested. I need this ASAP so I'm ready to pay as soon as complete.

Thanks!

cgillogly’s picture

I just posted a patch that fixes this on http://drupal.org/node/443880#comment-1915598