After I installed the "Node Comments" module and had 1 user added a comment, then all the other users including the admin user got a BLANK screen with the following error message when they click on the menu item "Recent posts":

Fatal error: Call to undefined function comment_page_new_query() in C:\Program Files\Apache Group\Apache2\htdocs\Drupal\drupal-5.1\modules\nodecomment\nodecomment_views.inc on line 250

Did I miss or do something wrong? Please advise. Many thanks in advance.
Phil

Comments

merlinofchaos’s picture

Project: Views (for Drupal 7) » Node Comments
Version: 5.x-1.5 » 5.x-1.0-beta

The location of the error message (modules/nodecomment) tells me this is a node comment issue.

one-50’s picture

Thanks for your advice. But do you know the fix? Is there any simple fix? Appreciate.

Phil

Paintbox’s picture

I have the exact same problem. It seems recent posts uses a function that isn't covered in by the node comments module (that's what I gather from that message)

I use views 5.1-1.6 , just updated to latest version.

If I find out more I shall follow up.

Paintbox’s picture

Just some more info.

The problem wasn't there when only the admin had made node comments. He could click on the "recent posts" just fine. Than a fake user made a comment, and now the admin and the fake user couldn't see the "recent posts" anymore, leading to the error described above.

Paintbox’s picture

Even more info : when I log out, the recent posts works fine...maybe this has to do with users / roles / user id (uid) ?

Paintbox’s picture

Allright, I got it to work now. Not sure *exactly* how and where it worked again, in between I closed the browser a few times and restarted.

This is what I think you should check :

* first delete all comments, and then check if the recent posts works (It should with all comments gone)
* Install latest views module (1.6 at time of writing)
* Then make sure the -tracker- module is installed (core module)
* Check access control and make sure new users are assigned to the proper role. Make sure that at least : access content, access comments, access all views are enables for everyone.
* Here is where I recommend cleaning all cookies and restarting
* Add comments with different users, start with admin, check recent posts, than with ordinary users, and constantly checking if recent posts work.

That should do it.

Paintbox’s picture

That doesn't solve it I am afraid, and so I had to dig deeper.

What isn't right is that in the Database, node_comments_statistics is incorrect : It says that my fake user , has 3 comments, and my admin has 0 comments. This is in fact not the case, 1 of those 3 belongs to the admin.

The plot thickens.

robertdouglass’s picture

Status: Active » Fixed

@Paintbox: thanks for your sleuthing =) The problem was really as simple as the error message, though: "Fatal error: Call to undefined function comment_page_new_query() " When a function doesn't exist it either means that a module or file is missing, or that there is simply a bug. In this case, it was a bug. The function probably existed at some time in development but got erased (leaving the reference to it behind). I've fixed this in beta3.

Anonymous’s picture

Status: Fixed » Closed (fixed)