I just got several headakes when upgrading from panels 2 to 3 since the node view override didnt work anymore. Many hours later I figured it out by reading a post on another comment override module where panels 3 seemed to break.

So, if you're using Comment display AND Panels 3 together in some fashion - just change these lines in comment_display.module from:

function comment_display_menu_alter(&$callbacks) {
  $callbacks['node/%node']['page callback'] = 'comment_display_node_page_view';
  $callbacks['node/%node/revisions/%/view']['page callback'] = 'comment_display_node_show';
}

to:

function comment_display_menu_alter(&$callbacks) {
  if (!module_exists('page_manager') && $items['node/%node']['page callback'] == 'node_page_view') {
    $callbacks['node/%node']['page callback'] = 'comment_display_node_page_view';
    $callbacks['node/%node/revisions/%/view']['page callback'] = 'comment_display_node_show';
  }
}

PS. Yeah, I should've made a patch but hey I should be sleeping allready. Sorry.

CommentFileSizeAuthor
#9 comment_display.module.546616.patch1.04 KBmr.j

Comments

sun’s picture

Status: Active » Fixed

Thanks! However, that is already fixed in the latest development snapshot.

Status: Fixed » Closed (fixed)

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

jcisio’s picture

I used the 1.0 with Panels 3 and node/%node breaks. Remove the module, but that doesn't fix. Cache cleared. Any idea?

Thanks.

jcisio’s picture

Status: Closed (fixed) » Active
jcisio’s picture

Status: Active » Closed (fixed)

Don't bother. I got it. Just go to Panels page and re-enable the node/%node page, it will work again.

sun’s picture

Title: Disables Panel 3's node view override - FIX! » Disables Panel 3's node view override
Status: Closed (fixed) » Fixed

Not sure what I was smoking in #1, but I committed that Panels fix now.

Status: Fixed » Closed (fixed)

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

mr.j’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Category: Task » Bug report
Priority: Critical » Normal
Issue summary: View changes
Status: Closed (fixed) » Needs work

I hate to drag up such an old issue but this was never fixed properly.

We use page manager but only for the home page on our site and we don't use it to override any node templates. So what happens without the correct fix is that all comments on a node are printed twice: first using the template variable that this module adds, then the default comments from the node module which are never removed because the page callback is never overridden.

mr.j’s picture

StatusFileSize
new1.04 KB

This fix works as it overrides the callback if the default one is still in place irrespective of what modules are installed, which is more or less what page_manager does itself.

sun’s picture

Patch doesn't apply.