In #443880: REALNAME module stops panel override from working, it looks like RealName was finessed to make it compatible with the "Page Manager" module (originally "Delegator") from Panels. However, I've noticed that with Page Manager 6.x-1.8 installed, the realname_user_view() is never invoked when I view the user page. Consequently, I am unable to apply the patch from #735436: Username instead of RealName in Profile Page Title because the affected code is never invoked.

I have not tried an earlier version of Panels to see if this is just a new incompatibility. However, I have verified that commenting out the code in realname_menu_alter() as follows does temporarily resolve the issue:

  $callbacks['user/%user_uid_optional']['title callback'] = 'realname_user_page_title';
//  if (!module_exists('delegator') && !module_exists('page_manager') && $callbacks['user/%user_uid_optional']['page callback'] == 'user_view') {
    $callbacks['user/%user_uid_optional']['page callback'] = 'realname_user_view';
//  }

I also have verified that this issue persists regardless of whether the "user_view" page override is enabled or disabled.

Any idea why this might be the case?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

GuyPaddock’s picture

This appears to be related to an issue with the Chaos Tools module: #1037330: hook_page_manager_override() is never invoked in page_manager_user_view()

GuyPaddock’s picture

Status: Active » Needs review
FileSize
1.73 KB

I found two issues here:

  1. There's an oversight/bug in the code for Page Manager that causes it not to invoke override functions for the "user_view" page. However, this only affects things when the "user_view" page override is enabled. Otherwise, this oversight/bug has no effect, since the affected code is bypassed (the "page_manager_user_view_disabled" variable is TRUE).
  2. There's an oversight/bug in realname_menu_alter() that causes it not to check the value of the "page_manager_user_view_disabled" variable before bypassing alteration of the menu item for user view pages.

I'm committing a patch to #1037330: hook_page_manager_override() is never invoked in page_manager_user_view() that should address #1 above, but the attached patch should fix #2.

GuyPaddock’s picture

Here's the same patch re-rolled for dev.

Status: Needs review » Needs work

The last submitted patch, 1036458_realname_user_view_never_called.patch, failed testing.

GuyPaddock’s picture

Version: 6.x-1.3 » 6.x-1.x-dev
GuyPaddock’s picture

Status: Needs work » Needs review
Dave Reid’s picture

Status: Needs review » Fixed

Thanks! Committed #3 to CVS.
http://drupal.org/cvs?commit=503502

Status: Fixed » Closed (fixed)
Issue tags: -panels, -Regression, -Page Manager

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