Closed (fixed)
Project:
Node Comments
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
15 Mar 2008 at 09:25 UTC
Updated:
2 Jun 2008 at 14:01 UTC
Jump to comment: Most recent file
Hi,
When I check the option "Display below post or comments"
I got following error with a cck content type node showing.
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '_node_form' was given in /public_html/includes/form.inc on line 217.
Thanks for going into this!
greetings,
Martijn
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | nodecomment_validation_234501.patch | 1.62 KB | sirkitree |
Comments
Comment #1
summit commentedHi,
Going into this, this is not related to the cck content type. It is the situation when the contenttype is set not to have comments. Then it is set to -none-.
I believe this function gives then the error, thanks to the help of marc from openresort:
There needs to be placed a certain 'IF" somewhere that when the contenttype is set NOT to have comments, that then this function is not triggered. The $comment_type is then empty!
I don't know the code enough to set it correct.
Please place the IF where it is the most efficient way in the code.
Thanks for going into this!
Greetings,
Martijn
Comment #2
sirkitree commentedI changed the above function to the following:
This takes care of the problem. Committing.
Comment #3
summit commentedGreat, thanks!
Greetings, Martijn
Comment #4
sirkitree commentedEven though I committed this to code, it is probably not the ideal way to deal with this. We should probably validate the node-edit form to make sure that if comments are enabled ($form['comment'] == 1 || 2) then make sure that a comment type ($form['comment_type']) and a view ($form['comment_view']) are chosen as well.
I'm having trouble trying to validate on the element level, so I probably need to validate on the form level. I'll give it a try and let you know how it goes.
Comment #5
sirkitree commentedComment #6
sirkitree commentedso that was pretty easy. try this patch out.
Comment #7
summit commentedHi, I gave seen you already committed it to .dev, thanks. It looks ok to me! greetings, Martijn.
Comment #8
sirkitree commentedComment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.