By anthonym on
Can anyone help with this? For one of my cck content types (other content types seem to be unaffected) I get three php errors when attempting to submit a comment. The comment submission actually works, but the comments look ugly of course. Can anyone point me in the right direction?
- warning: Invalid argument supplied for foreach() in /home/anthooa5/public_html/modules/node/node.module on line 521.
- warning: implode() [function.implode]: Invalid arguments passed in /home/anthooa5/public_html/modules/node/node.module on line 525.
- user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /home/anthooa5/public_html/includes/database.mysql.inc on line 172.
Comments
Bumping this up with some
Bumping this up with some additional info:
User Miraploy reported the same errors here (also with no reply yet): http://drupal.org/node/250917
These errors go away when the comment options are changed to display on the same page rather than on a separate page. Maybe this will help someone give some clues as to what is going on? Any help would be greatly appreciated. Thanks.
Anthony
--
anthonymosakowski.com
Same three errors
I'm getting the same three errors but AFAIK I'm not using any CCK fields.
Could it have something to do with the MySQL version?
I'm running:
MySQL database 5.0.45
PHP 5.2.6
What are you running?
Kevin
http://www.webwiseone.com
It's all about community.
https://bkjdigital.com
We make magic.
Same problem. Maybe some helpful info
I'm getting the same problem when I post a comment via email to the website. I'm using mailhandler with Messaging and Notifications modules to create a listserv kind of environment. When one of my users posts a comment on the website, it is entered just fine. The user receives their email as expected. However, when they reply, Drupal tries to digest the email and can't exactly. Mailhandler first returns the error:
No Data!!
And then the errors cited by anthonym repeat themselves several times afterward. However, what I found in my own case is that the comments **are** making it into the db. That is, if I go to:
admin/content/comment
I can see my comment there. If I click the edit link, I can edit it. But if I click the subject-line link on the /admin/content/comment page for that entry, I get a "page not found". This is because the destination of the link needs to be something like
node/180#comment-157
but instead it is:
node/0#comment-157
The first two numbers of the node are being clipped. I wish I could look in the database, but I can only do this testing on the live site and I don't have immediate access to the db there. I strongly suspect that the info in the db is mangled, but it may also be that they are being retrieved wrong for some reason.
Hope this helps.
-Saganesque
same error here
I have the same error. I can solve the problem but it will take time. The most time consuming part here will be the task of locating where the said query is located. If somebody can help me pinpoint where it is located, then it will lessen the time to solve this.
Please, everyone. Let's cooperate. If you know where this is, tell me and we'll solve this.
Looking forward,
jeuelc
Maybe it is fixed? If not,
Maybe it is fixed? If not, perhaps this points the way?
http://drupal.org/node/180529
The culprit piece of code in
The culprit piece of code in the other post is inside node_load(), node.module, called from cron:
I still have to believe that
I still have to believe that the way the comment was actually created with the truncated path after "node/" should indicate something key about the guts of the malfunction.
This is in an important one for us to fix and is very high on our list of priorities.
SOLVED
This problem is already solved. I accidentally found a patch is this site. I cannot remember the specific location (sorry). It worked out fine. The three (3) errors were avoided ust by adding four (4) lines of code in the node_load function of the node.module.
The following will be the resulting code of the said function after editting:
gack!
Can you at least tell me the name of the patch so I can google it? I really need to get this fixed! Which lines were fixed?
I don't think it is solved
As far as I can tell, this doesn't fix the problem. It just hides errors when they appear! The comment path isn't being built right, and that's why the error emerges!
Any resolution found?
Any resolution here? I have the same bewildering problem.
In my case, it was CaseTracker
The problem is likely a call by some module to node_load. I had to do some clunky debugging to find out which, but in my case it was CaseTracker that wasn't playing right with mailhandler, and by extension, node_load. The very dirty method of debugging I used I found here:
http://www.lullabot.com/articles/quick_and_dirty_debugging
On the upside, the page uses this bug as the example:
Look familiar? :-)
-Saganesque
Thanks for the help!
Familiar indeed - the clues at lullabot led me to the problem in my own code : in _phptemplate_variables() I was not checking for existence of $vars['node'] before calling node_load($vars['node']->nid) .
Thanks!
Thanks for the help!
Familiar indeed - the clues at lullabot led me to the problem in my own code : in _phptemplate_variables() I was not checking for existence of $vars['node'] before calling node_load($vars['node']->nid) .
Thanks!