I'm testing out the new 6x2 dev from today, 5/30/09, of the module, with Drupal 6.9, PHP 5.2, and almost every thing seams to be working = adding node type comments to other node types, and If viewing a teaser node the number of comments posted to the node get displayed
The problem is: if viewing a full node the comments don't display.= There are no comments or other views properties showing up.

Here is a list of things I have tried while trouble shooting with no luck .....................................................
Set comment view type to nodecomments and nodecomments_threaded

tried using the node comments with the following node types - Page, Story, and a cck specific node types.

Set the node comment tpl file in my different themes directories including garland. and tested with different themes.

I cleared the catch several times during testing

Tested with - drupal comments - which seam to work fine, though I only tested them with for story node type.

One thing to note is when I first installed the node comments module the comment module was not active.
though I didn't realize this until later, as most of the setting for comments were still available on the node type settings pages. as soon as I activated the comment module there of course were the regular settings for comments as well.

Note: If the node comment module is going to depend on the comments module, it may be a good idea to make it a dependency. but that's another issue.

Thanks for all the hard work on this module.

CommentFileSizeAuthor
#25 nodecommentblank.jpg74.08 KBuserok

Comments

quicksketch’s picture

It's really hard to tell where this problem is occurring, considering this module is in a super-flux state and doesn't yet have an upgrade path from the 1.x version. Could you start from a scratch Drupal site and try to outline steps to reproduce?

Note: If the node comment module is going to depend on the comments module, it may be a good idea to make it a dependency. but that's another issue.

Yes we're aware of this, but right now we don't have an upgrade path from 1.x. If we marked the comment.module as a dependency but nodecomment was already enabled (which will be the case for all users upgrading), then Drupal unhelpfully disables the checkbox for enabling comment.module making it impossible to turn on. We'll fix this in #473350: Upgrade path from Nodecomment 1.

quicksketch’s picture

Just something to try before starting from scratch, visit admin/content/nodecomment-convert and make sure there aren't any pending conversions necessary.

mcreature’s picture

Thanks for your reply quicksketch.
I tried your suggestion in comment #2 and there was nothing to update, so I will create a fresh install as you suggested and do some trouble shooting later this week. I will report the results back ASAP. Thanks again
Regards, Lowell

mcreature’s picture

OK I installed a fresh version of drupal 6.12, and the node comment dev. from today and I am still having the same issue with not seeing any comments on node view. though in addition I am am also getting the following error message when posting a comment node, replying to a comment node or editing a comment . ..

warning: array_search() [function.array-search]: Wrong datatype for second argument in ...... /sites/all/modules/nodecomment/nodecomment.module on line 281.

I'm using a recent views dev. from about a week ago. + cck, views, file field, image field and off course the comment module

A few things to note:
the node teasers are still showing the number of posts and I am also able to see the comment nodes on the front page Just not when viewing a node with comments.

merlinofchaos’s picture

At the moment nodecomment is not compatible with the delegator module in Panels 3. It is also possible that it may not be compatible with any other module that tries to take over the node view page.

Can you run this query and tell me the result?

select path, page_callback from menu_router where path = 'node/%';
merlinofchaos’s picture

I created a delegator module issue over here: http://drupal.org/node/486910 -- if that's your problem I hope to have a fix checked in later today.

merlinofchaos’s picture

mcreature’s picture

I added the query to the nodecomments view argument. I don't know if that was the right place?
but here is the result ................

SELECT node.nid AS nid
FROM node node
LEFT JOIN node_comments node_comments ON node.nid = node_comments.cid
LEFT JOIN node node_node_comments ON node_comments.nid = node_node_comments.nid
WHERE (node.status <> 0) AND (node_node_comments.nid = 0)

I did have panels three delegator module installed but I disabled it, I also disabled the ctools module just encase, and still not getting any view to shoe on commented nodes, also still getting same error message.

Is there something ells I can do to test? I will update the panels module later tonight and see if any thing changes.

merlinofchaos’s picture

You were just supposed to run that query and tell me the result. =)

mcreature’s picture

OK I feel a bit off base here, how do I run the query, or do you mean before unactivating the modules?
I ran it before and after I unactivated the modules with the same result, but you are probably referring to just running a
a simple query. and I am at a loss as to how or where from.

merlinofchaos’s picture

From mysql command line or phpmyadmin

mcreature’s picture

OK

mcreature’s picture

Ok result with delegator installed = - Showing rows 0 - 0 (1 total, Query took 0.0013 sec)
SQL query:
SELECT path, page_callback
FROM menu_router
WHERE path = 'node/%';

LIMIT 0 , 30

path page_callback
node/% delegator_node_view

mcreature’s picture

After disabaling the delegator module
printer friendly version

Generation Time: Jun 10, 2009 at 08:25 PM
Generated by: phpMyAdmin 2.11.9.5 / MySQL 5.0.75-community-log
SQL query: select path, page_callback from menu_router where path = 'node/%' LIMIT 0, 30 ;
Rows: 1
path node/%
page_callback nodecomment_node_view

merlinofchaos’s picture

Ok, nodecomment_node_view is a good sign. You should be seeing the nodecomments with that set up. THe other option might be if something is wrong with your view. You might consider deleting the nodecomment view to revert it to what comes in the code.

mcreature’s picture

I am using the default nodecomment view with out any changes. should I delete it any way
or maybe unistall and reinstall the node comments module? I will also try clearing the catch again

Thanks for your help

mcreature’s picture

OK clearing the catch and reverting the view worked,
Thanks again, Earl

merlinofchaos’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

Chompas’s picture

I'm having this exact problem. There were working before installing Google Maps Tools. Can this module has something to do with this?

In the views panels, the comments appears if I pass a node as an argument but in the node view not.

Chompas’s picture

Status: Closed (fixed) » Active

I can add that running the query from post #5 returns:
path page_callback
node/% node_page_view

merlinofchaos’s picture

Hmm. That means that either nodecomment failed to change the node/% handler, or something else put it back. I'm not sure why, but it explains the problem. nodecomment makes this change in nodecomment_menu_alter() (and this piece of code only gets run when a menu rebuild happens).

locomo’s picture

this is what i'm seeing when i run the query from #5

path page_callback
node/% _revisioning_view

(i'm also not seeing node comments view OR the comment form itself)

locomo’s picture

ok - so for me i can confirm that i'm having a conflict with the revisioning module .. when i disable the module and rerun the query from #5 I see "nodecomment_node_view" and nodecomment starts functioning as expected

I just found this thread about a conflict with panels and revisioning that looks very similar
http://drupal.org/node/519924#comment-2640810

i'm starting to get out of my comfort zone here but it seems like in "nodecomment_menu_alter" the module isn't able to take control of node/%node because revisioning already has?

is there a way to let these 2 modules play nice together? i definitely need revisioning and would love to get nodecomments working for a new forum we're rolling out

thanks!!

userok’s picture

StatusFileSize
new74.08 KB

I just updated to the latest version of Views 6.x-2.10 (2010-Apr-09) and Nodecommeent 6.x-2.0-beta3 (2010-Jan-29)
and I get the current result as seen on the attached jpg.

I haven't been able to get these two modules to work together since Node comments 6.x-2.0-beta1 and Views 6.x-2.6.

hope this helps.

Chompas’s picture

Is there a way to try to fix this?

locomo’s picture

Just wondering if there is any active development/support going on with this branch?

Up in comment #24 I think I'm getting closer to the root of my problem, but I'm not really sure how to proceed. I really need revisioning installed to support other workflows I already have going on the site. Ideally I would like to be able to use revisioning on the nodecomments content type.. but in the short term I'd be happy to let that go just to get nodecomments working.

Is is possible to somehow allow nodecomments to take over the node/node% for certain content types and allow revisioning to control it for others

(sorry if i'm not articulating this correctly)

crea’s picture

Title: Node comment views not showing on node view » Incompatibility with other modules overriding node view menu callback.
Priority: Critical » Normal

There's no active development atm, and the only support you can have is from other users.
Also, since it's incompatibility between modules, this is not critical. Nodecomments itself works fine.

locomo’s picture

Thanks Crea .. agreed.. not critical .. although for me its feeling critical :)

Is this conceptually possible? (to get these 2 modules working together)

Although not perfect, I don't even really need revisioning for my nodecomment content type or the source content type (forum in my case) .. but I do need revisioning installed for workflows dealing with other content types.

I'm more than willing to try to dig into it myself, but I'd be grateful for a little guidance. Are there other situations like this (conflicting node view menu callbacks) that have been solved that I could look to for a precedent?

I'm just not really sure where to start.

And I guess it would also be helpful to hear if this sounds like a really hard thing to fix .. in which case I'd fallback and use core comments.

Thanks !!

crea’s picture

Well. When 2 or more modules want to work with the same path, there are several options:

  1. Modules can check if the path is already overriden and give up early. This is what Panels and Page Manager module do. Then first module (with lowest weight) wins the race, other modules don't work.
  2. Modules can have sort-of compromise who will process the path, and the "leading" module then is responsible to provide bridges for other modules. This is what Panels (actually Page Manager) does when it's overriding a path and then lets display panes containing information from other modules including those whose path was overriden.
  3. Modules can declare each other incompatible and ignore the problem ;)
locomo’s picture

Thank you Crea - that is super helpful.

Given my skills I'm thinking while #2 sounds ideal, #1 or #3 are more what I might be capable of.

Are you suggesting in #1 that it might be as simple as changing the weight of nodecomments so that it "wins the race"?

Thanks again - I'll see what I can sort out and then report back.

crea’s picture

Simply changing weights won't help - most modules blindly overwrite old values. Only module I know that is is smart enough about not overwriting is the Page Manager.

UPD: It could help, but in opposite way - by increasing Node Comments weight you can ensure it's hook_menu_alter() runs last. Problem with this approach is you still get single module working, thus you are hiding the whole problem instead of fixing it.

crea’s picture

Want to add that I'm now (co)maintainer of Node Comments module so I am ready to discuss possible fixes. Though I don't see any easy solutions besides using Panels and let it be aforementioned "compromise" solution.

crea’s picture

I just noticed that Node Comments also is careful about overriding menu callbacks:

  // Override the node view handler for our purpose.
  if (!module_exists('delegator') &&
      (!module_exists('page_manager') ||
      variable_get('page_manager_node_view_disabled', TRUE)) &&
      $items['node/%node']['page callback'] == 'node_page_view') {
    $items['node/%node']['page callback'] = 'nodecomment_node_view';
  }

So we are stuck: if we decrease weght of Nodecomments, it will override first but will be overriden by other modules which are not so polite. If we OTOH increase it's weight, it won't override because it's polite and careful ;))))
Because of this, changing module weights is not an option again.

I suggest the following: if another module needs own node view page callback, it's his responsibility to provide Node Comments compatibility (inserting nodecomment view, node comment form etc). It works this way already with Panels.

locomo’s picture

I guess what I'm thinking about is an approach based on content type.. that if a given content type is using nodecomments to handle its comments it would override the callback of other modules

its still not a real solution - the two modules would still conflict.. but it would be contained to a content type instead of site-wide

seems like something like this would give folks some more flexibility until a better solution could be found

crea’s picture

"a better solution" already exists - it's called page manager module. And it does what you describe.
Regarding conflict with Revisioning: I think it's Revisioning module duty to play nice in this case.

locomo’s picture

okay - sorry.. starting to feel like i'm going around in circles..

so would you suggest switching this issue to revisioning? or starting a new issue with them?

if you could bare with me, i'd appreciate your help in wording the desire/suggestion.. would the request be to have them use page manager to handle their node view menu callbacks?

thanks Crea

merlinofchaos’s picture

You could borrow or copy Page Manager's "override anyway" flag.

crea’s picture

function _revisioning_view($node) {
  if (_revisioning_load_op($node, 'view') == REVISIONING_LOAD_LATEST) {
    $vid_to_load = revisioning_get_latest_revision_id($node->nid);
    $node = node_load($node->nid, $vid_to_load);
  }
  // In node.module, node_page_view() is used to display the current, while
  // node_show() is used for any other revision. The difference between the
  // two is that node_page_view() surpresses the message that tells us we're
  // viewing a revision. That's what we use here because we have our own
  // configurable message.
  return node_page_view($node);
}

Note the last line: Revisioning blindly fallbacks to original node module page callback, even while it could override arbitrary one (including Node Comment's one). This information should be enough for Revisioning module if not to fix then atleast to workaround the problem. This is assuming Revisioning module weight is bigger than Node Comments one.

locomo’s picture

thanks Crea

I've created a new issue with the revisioning module:
http://drupal.org/node/796470

please chime in on that thread if what i posted could use further clarification

angelmax’s picture

subscribe

crea’s picture

Category: bug » support

Technically speaking, this is not a bug. It's a limitation of Drupal API.

crea’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev

3.x has this "by design" problem as well.

crea’s picture

Status: Active » Fixed

I have added a note to README. There's nothing more we can do about it.

Status: Fixed » Closed (fixed)

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